@@ -47,32 +47,36 @@ void main() {
4747 } catch (e) {
4848 throw 'ERRORSTART $line ERROREND' ;
4949 }
50-
51- final testType = TestTypes .values.firstWhereOrNull (
52- (type) => type.name == decoded['test_type' ],
53- );
54- final outputLine = switch (testType) {
55- TestTypes .collation => testCollation (line),
56- TestTypes .decimal_fmt => testDecimalFormatWrapped (line),
57- TestTypes .number_fmt => testDecimalFormatWrapped (line),
58- TestTypes .datetime_fmt => testDateTimeFmt (line),
59- TestTypes .display_names => throw UnimplementedError (
60- 'display_names is not supported yet' ,
61- ),
62- TestTypes .lang_names => testLangNames (line),
63- // TestTypes.likely_subtags => testLikelySubtags(line),
64- TestTypes .likely_subtags => throw UnimplementedError (
65- 'likely_subtags is not supported yet, as the Locale object is not yet migrated to ICU4X' ,
66- ),
67- TestTypes .list_fmt => testListFmt (line),
68- TestTypes .plural_rules => testPluralRules (line),
69- null => throw ArgumentError .value (
70- decoded['test_type' ],
71- 'Unknown test type' ,
72- ),
73- };
74-
75- print (outputLine);
50+ try {
51+ final testType = TestTypes .values.firstWhereOrNull (
52+ (type) => type.name == decoded['test_type' ],
53+ );
54+ final outputLine = switch (testType) {
55+ TestTypes .collation => testCollation (line),
56+ TestTypes .decimal_fmt => testDecimalFormatWrapped (line),
57+ TestTypes .number_fmt => testDecimalFormatWrapped (line),
58+ TestTypes .datetime_fmt => testDateTimeFmt (line),
59+ TestTypes .display_names => throw UnimplementedError (
60+ 'display_names is not supported yet' ,
61+ ),
62+ TestTypes .lang_names => testLangNames (line),
63+ // TestTypes.likely_subtags => testLikelySubtags(line),
64+ TestTypes .likely_subtags => throw UnimplementedError (
65+ 'likely_subtags is not supported yet, as the Locale object is not yet migrated to ICU4X' ,
66+ ),
67+ TestTypes .list_fmt => testListFmt (line),
68+ TestTypes .plural_rules => testPluralRules (line),
69+ null => throw ArgumentError .value (
70+ decoded['test_type' ],
71+ 'Unknown test type' ,
72+ ),
73+ };
74+ print (outputLine);
75+ } catch (e, s) {
76+ throw ArgumentError (
77+ 'Error while executing on $line . Error was:\n $e \n $s ' ,
78+ );
79+ }
7680 }
7781 }
7882}
0 commit comments