ErrorCallbackHandler typedef Null safety
The type of a custom Zone.errorCallback implementation function.
Receives the Zone that the handler was registered on as
a delegate forwarding to the handlers of
self's parent zone as
and the current zone where the error was uncaught as
which will have
self as a parent zone.
stackTrace are the error and stack trace
passed to Zone.errorCallback of
The function should return either
null if it doesn't want
to replace the original error and stack trace,
or an AsyncError containing a replacement error and stack trace
which will be used to replace the originals.
The error callback handler must not throw.
The function must only access zone-related functionality through
It should not depend on the current zone (Zone.current).
typedef AsyncError? ErrorCallbackHandler(Zone self, ZoneDelegate parent,
Zone zone, Object error, StackTrace? stackTrace);