OtpCryptoException class

Base class for all OTP crypto exceptions.

Implemented types
Implementers

Constructors

OtpCryptoException.new(String code, String message, {Object? cause, StackTrace? stackTrace})
const

Properties

cause Object?
Optional cause (low-level exception) for diagnostics.
final
code String
Stable error code (not localized) for programmatic handling.
final
hashCode int
The hash code for this object.
no setterinherited
message String
Human-readable, generic message safe to show to users.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
Optional stack trace from the originating error.
final

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

wrap(Object error, {required String code, required String message, StackTrace? stackTrace}) OtpCryptoException
Wraps any error as an OtpCryptoException with the given code and generic message. If error is already an OtpCryptoException, it is returned unchanged.