LocusError class

Locus SDK error with classification and recovery hints.

Implemented types

Constructors

LocusError({required LocusErrorType type, required String message, Object? originalError, StackTrace? stackTrace, String? operation, bool isRecoverable = true, RecoveryAction? suggestedRecovery, JsonMap? details, DateTime? timestamp})
Creates a Locus error.
LocusError.fromException(Object error, [StackTrace? stack])
Creates from a generic exception.
factory
LocusError.networkError({String? message, Object? originalError})
Network error during sync.
factory
LocusError.permissionDenied({String? message})
Location permission denied.
factory
LocusError.serviceDisconnected()
Service disconnected.
factory
LocusError.servicesDisabled({String? message})
Location services disabled.
factory
LocusError.timeout({Duration? timeout})
Location acquisition timeout.
factory

Properties

details JsonMap?
Additional error details.
final
hashCode int
The hash code for this object.
no setterinherited
isRecoverable bool
Whether this error is recoverable.
final
message String
Human-readable error message.
final
operation String?
Operation that failed.
final
originalError Object?
Original exception if available.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
Stack trace if available.
final
suggestedRecovery RecoveryAction?
Suggested recovery action.
final
timestamp DateTime
Timestamp when error occurred.
final
type LocusErrorType
Error type classification.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() JsonMap
Converts to a JSON-serializable map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited