addError method

  1. @mustCallSuper
void addError(
  1. Object error,
  2. [StackTrace? stackTrace]
)

Reports an error which triggers onError with an optional StackTrace.

Implementation

@mustCallSuper
void addError(Object error, [StackTrace? stackTrace]) {
  onError(error, stackTrace ?? StackTrace.current);
}