@@ -258,6 +258,8 @@ const _reachabilityError = _LateErrorWithoutDetails(
258258
259259const _noSuchMethodErrorWithoutDetails = _NoSuchMethodErrorWithoutDetails ();
260260
261+ const _unsupportedErrorWithoutDetails = _UnsupportedErrorWithoutDetails ();
262+
261263const typeErrorWithoutDetails = _TypeErrorWithoutDetails ();
262264
263265class _ErrorWithoutDetails implements Error {
@@ -278,7 +280,7 @@ class _ArgumentErrorWithoutDetails extends _ErrorWithoutDetails
278280 String ? get name => null ;
279281
280282 @override
281- String get message => toString () ;
283+ String get message => _message ;
282284
283285 @override
284286 dynamic get invalidValue => null ;
@@ -290,16 +292,16 @@ class _IndexErrorWithoutDetails extends _ArgumentErrorWithoutDetails
290292 : super ('IndexError (details omitted due to --minify)' );
291293
292294 @override
293- int get start => throw 'no details' ;
295+ int get start => throw _unsupportedErrorWithoutDetails ;
294296
295297 @override
296- int get end => throw 'no details' ;
298+ int get end => throw _unsupportedErrorWithoutDetails ;
297299
298300 @override
299- int get length => throw 'no details' ;
301+ int get length => throw _unsupportedErrorWithoutDetails ;
300302
301303 @override
302- int get invalidValue => throw 'no details' ;
304+ int get invalidValue => throw _unsupportedErrorWithoutDetails ;
303305
304306 @override
305307 Object ? get indexable => null ;
@@ -335,3 +337,12 @@ class _LateErrorWithoutDetails extends _ErrorWithoutDetails
335337 implements LateError {
336338 const _LateErrorWithoutDetails (String message) : super (message);
337339}
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