FailureException class

Indicates failure of an operation / command.

Includes user-friendly error messages for the failure and hints if available. These should be shown to the user.

A technical reason and causing exception is also included to aid in testing and debugging.

Implemented types
Implementers

Constructors

FailureException({String? error, Iterable<String>? errors, String? hint, String? reason, Exception? nestedException, StackTrace? nestedStackTrace})
Creates a FailureException.
FailureException.nested(Exception nestedException, [StackTrace? nestedStackTrace, String? error, String? hint])
Simplified factory constructor for a FailureException with a nested exception. If the nested exception is a FailureException it is returned as is.
factory

Properties

errors → List<String>
The error messages for this failure, if any, in a user-friendly format.
final
exitCode → int
The exit code to use.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hint → String?
The user hint relevant for this failure, if any.
final
nestedException → Exception?
The exception that caused this failure, if any.
final
nestedStackTrace → StackTrace?
The stack trace of the exception that caused this failure, if any.
final
reason → String?
The technical reason for this failure, if known. Might be technical rather than user-friendly.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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