PlatformOperationException class
Base exception for platform channel/OS operation failures.
- Inheritance
-
- Object
- BaseException
- PlatformOperationException
- Implementers
- Annotations
Constructors
-
PlatformOperationException({required String operation, required String userMessage, required String devMessage, String? code, dynamic details, Object? cause, StackTrace? stack, Map<
String, dynamic> metadata = const {}, Severity severity = Severity.error, bool isReportable = true}) -
Creates a platform exception describing the failed
operation. - PlatformOperationException.fromPlatformException(PlatformException e, {required String operation, String? userMessage, String? devMessage, bool isReportable = true, Severity? severity})
-
Creates a PlatformOperationException from a PlatformException.
factory
Properties
- cause → Object?
-
Original underlying error, if any.
finalinherited
- code → String?
-
Platform-specific error code, when provided by the channel.
final
- details → dynamic
-
Additional details supplied by the platform.
final
- devMessage → String
-
Developer-friendly details, safe for logs and tools.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPermissionError → bool
-
Indicates whether the platform error stems from a permission issue.
no setter
- isReportable → bool
-
Whether this exception should be reported automatically.
finalinherited
- isTimeout → bool
-
Indicates whether the platform error represents a timeout.
no setter
-
metadata
→ Map<
String, dynamic> -
Additional diagnostic data related to this exception.
finalinherited
- operation → String
-
Logical operation name (e.g., "camera_capture").
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity → Severity
-
How serious this exception is.
finalinherited
- stack → StackTrace?
-
Capture location. Defaults to StackTrace.current when not provided.
finalinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - userMessage → String
-
Human-friendly text appropriate for end-users.
finalinherited
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