ElbeError class
ElbeError is a class that represents an error in the Elbe framework. It contains a code, message and optional details. It can be localized using the ElbeErrors service.
Constructors
- ElbeError(String code, String message, {dynamic cause, String? description, IconData? icon})
-
const
- ElbeError.http(int statusCode, {String? message, dynamic details})
-
Create an ElbeError instance for an HTTP error.
the
statusCode
is the HTTP status code and will be prefixed with "HTTP_". - ElbeError.serviceNotInitialized([String service = "- unknown -"])
-
Create an ElbeError instance for a service not initialized error.
const
- ElbeError.unknown([dynamic cause])
-
Create an ElbeError instance for an unknown error.
const
Properties
- cause → ElbeError?
-
final
-
causeChain
→ List<
ElbeError> -
no setter
- code → String
-
no setter
- description → String?
-
final
- details → dynamic
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
final
- map → JsonMap
-
no setteroverride
- message → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? code, String? message, Opt< String> ? description, Opt<IconData> ? icon}) → ElbeError - Returns a copy of the error with the provided values.
-
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