WrapError<St> class

This will be given all errors (including of type UserException).

  • If it returns a UserException, it will be used instead of the original exception.
  • Otherwise, just return null, so that the original exception will not be modified.

Note this wrapper is called AFTER ReduxAction.wrapError, and BEFORE the ErrorObserver.

The use case for this is to have a global place to convert some exceptions into UserExceptions. For example, Firebase may throw some PlatformExceptions in response to a bad connection to the server. In this case, you may want to show the user a dialog explaining that the connection is bad, which you can do by converting it to a UserException. Note, this could also be done in the ReduxAction.wrapError, but then you'd have to add it to all actions that use Firebase.

Constructors

WrapError()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited
wrap(Object error, StackTrace stackTrace, ReduxAction<St> action) UserException

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited