CommandFailure class final

Class which represents a result of unsuccesful command execution.

Inheritance

Constructors

CommandFailure(CommandError error, {List<ValidationError> validationErrors = const []})
Creates a CommandFailure class.
const

Properties

error CommandError
Error which was the reason of query failure
final
hashCode int
The hash code for this object.
no setterinherited
isFailure bool
Whether this instance is of final type CommandFailure.
no setterinherited
isInvalid bool
Whether this instance is of final type CommandFailure and comes from validation error.
no setterinherited
isSuccess bool
Whether this instance is of final type CommandSuccess.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
validationErrors List<ValidationError>
A list of ValidationError errors returned from the backed after command execution.
final

Methods

hasError(int code) bool
Checks whether this CommandFailure contains a provided error code in its validation errors.
hasErrorForProperty(int code, String propertyName) bool
Checks whether this CommandFailure contains a provided error code in its validation errors related to the propertyName.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited