@@ -211,22 +211,20 @@ Never _throwReachabilityError([String? _message]) {
211
211
throw ReachabilityError (_message);
212
212
}
213
213
214
- const _indexErrorWithoutDetails = _ErrorWithoutDetails (
215
- 'IndexError (details omitted due to --minify)' ,
216
- );
217
- const _rangeErrorWithoutDetails = _ErrorWithoutDetails (
214
+ const _indexErrorWithoutDetails = _IndexErrorWithoutDetails ();
215
+ const _rangeErrorWithoutDetails = _RangeErrorWithoutDetails (
218
216
'RangeError (details omitted due to --minify)' ,
219
217
);
220
- const _alignmentErrorWithoutDetails = _ErrorWithoutDetails (
218
+ const _alignmentErrorWithoutDetails = _RangeErrorWithoutDetails (
221
219
'Offset had incorrect alignment (details omitted due to --minify)' ,
222
220
);
223
- const _negativeValueErrorWithoutDetails = _ErrorWithoutDetails (
221
+ const _negativeValueErrorWithoutDetails = _RangeErrorWithoutDetails (
224
222
'Value was negative (details omitted due to --minify)' ,
225
223
);
226
- const _negativeOrZeroValueErrorWithoutDetails = _ErrorWithoutDetails (
224
+ const _negativeOrZeroValueErrorWithoutDetails = _RangeErrorWithoutDetails (
227
225
'Value was negative or zero (details omitted due to --minify)' ,
228
226
);
229
- const _nullErrorWithoutDetails = _LateErrorWithoutDetails (
227
+ const _nullErrorWithoutDetails = _ArgumentErrorWithoutDetails (
230
228
'Value must not be null (details omitted due to --minify)' ,
231
229
);
232
230
@@ -258,44 +256,82 @@ const _reachabilityError = _LateErrorWithoutDetails(
258
256
'ReachabilityError (details omitted due to --minify)' ,
259
257
);
260
258
261
- const _NoSuchMethodErrorWithoutDetails _noSuchMethodErrorWithoutDetails =
262
- _NoSuchMethodErrorWithoutDetails ();
259
+ const _noSuchMethodErrorWithoutDetails = _NoSuchMethodErrorWithoutDetails ();
263
260
264
- const _TypeErrorWithoutDetails typeErrorWithoutDetails =
265
- _TypeErrorWithoutDetails ();
261
+ const typeErrorWithoutDetails = _TypeErrorWithoutDetails ();
266
262
267
263
class _ErrorWithoutDetails implements Error {
268
264
final String _message;
265
+
269
266
const _ErrorWithoutDetails (this ._message);
270
267
271
268
StackTrace ? get stackTrace => null ;
272
269
273
270
String toString () => _message;
274
271
}
275
272
276
- class _TypeErrorWithoutDetails implements TypeError {
277
- const _TypeErrorWithoutDetails ();
273
+ class _ArgumentErrorWithoutDetails extends _ErrorWithoutDetails
274
+ implements ArgumentError {
275
+ const _ArgumentErrorWithoutDetails (String message) : super (message);
278
276
279
- StackTrace ? get stackTrace => null ;
277
+ @override
278
+ String ? get name => null ;
280
279
281
- String toString () =>
282
- 'Runtime type check failed (details omitted due to --minify)' ;
280
+ @override
281
+ String get message => toString ();
282
+
283
+ @override
284
+ dynamic get invalidValue => null ;
283
285
}
284
286
285
- class _NoSuchMethodErrorWithoutDetails implements NoSuchMethodError {
286
- const _NoSuchMethodErrorWithoutDetails ();
287
+ class _IndexErrorWithoutDetails extends _ArgumentErrorWithoutDetails
288
+ implements IndexError {
289
+ const _IndexErrorWithoutDetails ()
290
+ : super ('IndexError (details omitted due to --minify)' );
287
291
288
- StackTrace ? get stackTrace => null ;
292
+ @override
293
+ int get start => throw 'no details' ;
289
294
290
- String toString () => 'NoSuchMethodError (details omitted due to --minify)' ;
295
+ @override
296
+ int get end => throw 'no details' ;
297
+
298
+ @override
299
+ int get length => throw 'no details' ;
300
+
301
+ @override
302
+ int get invalidValue => throw 'no details' ;
303
+
304
+ @override
305
+ Object ? get indexable => null ;
291
306
}
292
307
293
- class _LateErrorWithoutDetails implements LateError {
294
- final String _message;
308
+ class _RangeErrorWithoutDetails extends _ArgumentErrorWithoutDetails
309
+ implements RangeError {
310
+ const _RangeErrorWithoutDetails (String message) : super (message);
295
311
296
- const _LateErrorWithoutDetails (this ._message);
312
+ @override
313
+ num ? get start => null ;
297
314
298
- StackTrace ? get stackTrace => null ;
315
+ @override
316
+ num ? get end => null ;
299
317
300
- String toString () => _message;
318
+ @override
319
+ num ? get invalidValue => null ;
320
+ }
321
+
322
+ class _TypeErrorWithoutDetails extends _ErrorWithoutDetails
323
+ implements TypeError {
324
+ const _TypeErrorWithoutDetails ()
325
+ : super ('Runtime type check failed (details omitted due to --minify)' );
326
+ }
327
+
328
+ class _NoSuchMethodErrorWithoutDetails extends _ErrorWithoutDetails
329
+ implements NoSuchMethodError {
330
+ const _NoSuchMethodErrorWithoutDetails ()
331
+ : super ('NoSuchMethodError (details omitted due to --minify)' );
332
+ }
333
+
334
+ class _LateErrorWithoutDetails extends _ErrorWithoutDetails
335
+ implements LateError {
336
+ const _LateErrorWithoutDetails (String message) : super (message);
301
337
}
0 commit comments