onError property
Called when handle throws.
When null, the error is reported to the current zone via
Zone.handleUncaughtError. In either case whatever handle placed in
the retry buffer is returned to the queue and processing continues —
but only that. Entries the throwing handle did not hand back are gone;
reporting the error does not preserve them.
Note: in a plain Dart program without an error zone, an uncaught
asynchronous error terminates the isolate by default — and then nothing
keeps processing. Provide onError or wrap the app in
runZonedGuarded.
Implementation
final void Function(Object error, StackTrace stackTrace)? onError;