reportInternalError function

void reportInternalError(
  1. Exception error, {
  2. bool fatal = false,
  3. Analytics? analytics,
})

Implementation

void reportInternalError(Exception error, {bool fatal = false, Analytics? analytics}) {
  log("An internal error occurred: $error", kind: LogFilterKind.error);

  final errorHandler = analytics?.state.configuration.state.errorHandler;
  if (errorHandler != null) {
    errorHandler(error);
  }

  if (fatal) {
    AssertionError("A critical error occurred: $error");
  }
}