CryptoError class
Exception thrown when an error occurs during a cryptographic operation.
You can translate the error messages using key or type.
try {
aCryptoOperation();
} on CryptoError catch (e) {
print(e.message); // 'Prefix not found'
print(e.key); // 'prefixNotFound'
}
Constructors
- CryptoError({required CryptoErrorTypes type, String? message, dynamic cause})
- Default constructor.
Properties
- cause → dynamic
-
final
-
dynamicErrorMessages
→ Map<
CryptoErrorTypes, String Function(dynamic e)> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
String representation of type.
no setter
- message → String
-
Human readable explanation of this.
no setter
- originalException → dynamic
-
Cause of this, might be null.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
staticErrorsMessages
→ Map<
CryptoErrorTypes, String> -
final
- type → CryptoErrorTypes
-
Type of this.
no setter
Methods
-
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