onError<TError> method

  1. @override
void onError<TError>(
  1. ErrorCallback<TError> handler
)
inherited

Registers a handler to be invoked whenever an error of type TError is encountered.

Implementation

@override
void onError<TError>(ErrorCallback<TError> handler) {
  _exceptionCheckers.add((error) => error is TError);
  _exceptionRunners.add((error) => handler(error as TError));
}