SmartAccountException class sealed

Base sealed class for Smart Account exceptions.

Catch SmartAccountException for general handling; switch on concrete subtypes when fine-grained recovery is required:

try {
  final result = await kit.walletOperations.createWallet(userName: 'My Wallet');
  print('Wallet created: ${result.contractId}');
} on WebAuthnException catch (e) {
  // ... handle WebAuthn-specific errors
} on SmartAccountException catch (e) {
  print('Error ${e.code.code}: ${e.message}');
}
Implemented types
Implementers

Properties

cause → Object?
The original throwable that triggered this exception, if any.
final
code → SmartAccountErrorCode
The categorised error code for this exception.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
A human-readable error message describing the failure.
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

Static Methods

wrapError(Object err, {SmartAccountErrorCode defaultCode = SmartAccountErrorCode.invalidInput}) → SmartAccountException
Wraps an arbitrary throwable into a SmartAccountException.