call method

void call(
  1. Object exception, [
  2. Object? stackTrace,
  3. @Deprecated('No longer supported. Remove this argument.') String? reason
])

Handles an error or exception caught at runtime.

NOTE: stackTrace should be typed as StackTrace, but currently is not and there is user code depending on this being more generic. Follow b/162611781.

NOTE: reason is always null and never provided. See b/162611781.

Implementation

void call(
  Object exception, [
  Object? stackTrace,
  @Deprecated('No longer supported. Remove this argument.') String? reason,
]) {
  window.console.error(ExceptionHandler.exceptionToString(
    exception,
    stackTrace,
    reason,
  ));
}