From 49fac9a885df6f1029799fd208fdd79df019c387 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 11 Aug 2020 11:44:03 -0700 Subject: [PATCH] [flutter_tools] add more error context to tree shaker failure (#63446) --- .../lib/src/build_system/targets/icon_tree_shaker.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart b/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart index 4d09ad0a08..e5b5022cf2 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart @@ -66,7 +66,7 @@ class IconTreeShaker { } } - /// The MIME type for ttf fonts. + /// The MIME types for supported font sets. static const Set kTtfMimeTypes = { 'font/ttf', // based on internet search 'font/opentype', @@ -383,5 +383,7 @@ class IconTreeShakerException implements Exception { final String message; @override - String toString() => 'FontSubset error: $message'; + String toString() => 'IconTreeShakerException: $message\n\n' + 'To disable icon tree shaking, pass --no-tree-shake-icons to the requested ' + 'flutter build command'; }