Fail class
Classe di errore usata nella Validation e può contenere un Error o un'Exception
Molto simile come concetto a Either
Constructors
- Fail.withError(Error error, {String message = ''})
- Fail.withException(Exception exception, {String message = ''})
Properties
Methods
-
fold<
T> (T errF(Error err), T excF(Exception exc)) → T - Estrae il possibile Error o Exception.
-
isExceptionOfType(
Type t) → bool -
Se
Failcontiene un eccezione e quell'eccezione è del tipo passato allora ritornatrue, altrimentifalse -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toInvalid<
T> () → Validation< T> -
toIterable(
) → Iterable< Fail> - Crea un Iterable con un solo elemento contenente il Fail corrente
-
toString(
) → String -
Restituisce il messaggio dell'Error o dell'Exception
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited