@@ -258,6 +258,8 @@ const _reachabilityError = _LateErrorWithoutDetails(
258
258
259
259
const _noSuchMethodErrorWithoutDetails = _NoSuchMethodErrorWithoutDetails ();
260
260
261
+ const _unsupportedErrorWithoutDetails = _UnsupportedErrorWithoutDetails ();
262
+
261
263
const typeErrorWithoutDetails = _TypeErrorWithoutDetails ();
262
264
263
265
class _ErrorWithoutDetails implements Error {
@@ -278,7 +280,7 @@ class _ArgumentErrorWithoutDetails extends _ErrorWithoutDetails
278
280
String ? get name => null ;
279
281
280
282
@override
281
- String get message => toString () ;
283
+ String get message => _message ;
282
284
283
285
@override
284
286
dynamic get invalidValue => null ;
@@ -290,16 +292,16 @@ class _IndexErrorWithoutDetails extends _ArgumentErrorWithoutDetails
290
292
: super ('IndexError (details omitted due to --minify)' );
291
293
292
294
@override
293
- int get start => throw 'no details' ;
295
+ int get start => throw _unsupportedErrorWithoutDetails ;
294
296
295
297
@override
296
- int get end => throw 'no details' ;
298
+ int get end => throw _unsupportedErrorWithoutDetails ;
297
299
298
300
@override
299
- int get length => throw 'no details' ;
301
+ int get length => throw _unsupportedErrorWithoutDetails ;
300
302
301
303
@override
302
- int get invalidValue => throw 'no details' ;
304
+ int get invalidValue => throw _unsupportedErrorWithoutDetails ;
303
305
304
306
@override
305
307
Object ? get indexable => null ;
@@ -335,3 +337,12 @@ class _LateErrorWithoutDetails extends _ErrorWithoutDetails
335
337
implements LateError {
336
338
const _LateErrorWithoutDetails (String message) : super (message);
337
339
}
340
+
341
+ class _UnsupportedErrorWithoutDetails extends _ErrorWithoutDetails
342
+ implements UnsupportedError {
343
+ const _UnsupportedErrorWithoutDetails ()
344
+ : super ('UnsupportedError (details omitted due to --minify)' );
345
+
346
+ @override
347
+ String get message => _message;
348
+ }
0 commit comments