onErrorHandle static method
Implementation
static Function onErrorHandle(Zone zone, Function? handleError) {
handleError ??= _nullOnErrorHandler;
if (handleError is void Function(Object, StackTrace)) {
return zone.registerBinaryCallback(handleError);
} else if (handleError is void Function(Object)) {
return zone.registerUnaryCallback(handleError);
}
throw ArgumentError("handleError callback must take either an Object "
"(the error), or both an Object (the error) and a StackTrace.");
}