ScannerException class
Exception thrown by scanner operations
Provides structured error information with error codes, human-readable messages, and optional additional details.
- Implemented types
Constructors
-
ScannerException(ScannerErrorCode errorCode, String message, {Map<
String, dynamic> ? details, String? platformMessage, DateTime? timestamp}) - ScannerException.cameraNotAvailable()
-
Create a camera not available error
factory
- ScannerException.fileNotFound(String filePath)
-
Create a file not found error
factory
- ScannerException.fromPlatform(dynamic platformException)
-
Create from platform exception
factory
- ScannerException.initializationFailed(String reason)
-
Create an initialization failed error
factory
- ScannerException.invalidConfiguration(String reason)
-
Create an invalid configuration error
factory
- ScannerException.permissionDenied()
-
Create a permission denied error
factory
Properties
-
details
→ Map<
String, dynamic> ? -
Additional error details
final
- errorCode → ScannerErrorCode
-
Error code identifying the type of error
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isRecoverable → bool
-
Check if this is a recoverable error
no setter
- message → String
-
Human-readable error message
final
- platformMessage → String?
-
Platform-specific error information
final
- requiresUserAction → bool
-
Check if this error requires user action
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
Timestamp when the error occurred
final
- userFriendlyMessage → String
-
Get user-friendly error message
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Convert to map for serialization
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override