ErrorCallbackHandler typedef
- Zone self,
- ZoneDelegate parent,
- Zone zone,
- Object error,
- StackTrace? stackTrace
The type of a custom Zone.errorCallback implementation function.
Receives the Zone that the handler was registered on as self
, a delegate forwarding to the handlers of self
's parent zone as parent
, and the current zone where the error was uncaught as zone
, which will have self
as a parent zone.
The error
and stackTrace
are the error and stack trace passed to Zone.errorCallback of zone
.
The function should return either null
if it doesn't want to replace the original error and stack trace, or an AsyncError containg a replacement error and stack trace which will be used to replace the originals.
Implementation
typedef AsyncError? ErrorCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace? stackTrace);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-async/ErrorCallbackHandler.html