reportCheckedError static method
Report checked error (error caught in try-catch block). Catcher 2 will treat this as normal exception and pass it to handlers.
Implementation
static void reportCheckedError(
dynamic error,
dynamic stackTrace, {
Map<String, dynamic>? extraData,
}) {
error ??= 'undefined error';
stackTrace ??= StackTrace.current;
_instance._reportError(error, stackTrace, extraData: extraData);
}