observe method
The observe method of the ErrorObserver will be given all errors. It's called after the action's ReduxAction.wrapError and the GlobalWrapError have both been called.
The observe method should return true
to throw the error, and false
to swallow it.
Note: The ErrorObserver will be given all errors, including those of type UserException
and AbortDispatchException. To maintain the default behavior, you should return false
(swallow) for both these error types.
Important: Don't use the store
you get in the observe method to dispatch any actions,
as this may have unpredictable results. Also, make sure your errorObserver never throws an
error.
Implementation
@override
bool observe(
Object error,
StackTrace stackTrace,
ReduxAction<St> action,
Store store,
) =>
true;