onError method

FutureOr<R> onError(
  1. Object error,
  2. StackTrace stackTrace,
  3. A arg
)

Hook method that is called if the next handler throws.

If it returns a value, this handler completes normally with that value. Otherwise the exception propagates to the caller.

Implementation

FutureOr<R> onError(
  final Object error,
  final StackTrace stackTrace,
  final A arg,
) {
  Error.throwWithStackTrace(error, stackTrace);
}