void call(exception, [ stackTrace = null, String reason = null ])

Source

void call(dynamic exception,
    [dynamic stackTrace = null, String reason = null]) {
  var originalException = this._findOriginalException(exception);
  var originalStack = this._findOriginalStack(exception);
  var context = this._findContext(exception);
  this
      ._logger
      .logGroup('''EXCEPTION: ${ this . _extractMessage ( exception )}''');
  if (stackTrace != null && originalStack == null) {
    this._logger.logError("STACKTRACE:");
    this._logger.logError(this._longStackTrace(stackTrace));
  }
  if (reason != null) {
    this._logger.logError('''REASON: ${ reason}''');
  }
  if (originalException != null) {
    this._logger.logError(
        '''ORIGINAL EXCEPTION: ${ this . _extractMessage ( originalException )}''');
  }
  if (originalStack != null) {
    this._logger.logError("ORIGINAL STACKTRACE:");
    this._logger.logError(this._longStackTrace(originalStack));
  }
  if (context != null) {
    this._logger.logError("ERROR CONTEXT:");
    this._logger.logError(context);
  }
  this._logger.logGroupEnd();
  // We rethrow exceptions, so operations like 'bootstrap' will result in an error
 
  // when an exception happens. If we do not rethrow, bootstrap will always succeed.
  if (this._rethrowException) throw exception;
}