SquadronException class abstract

Base abstract class for exceptions in Squadron.

Implemented types
Implementers

Constructors

SquadronException()

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
The exception's StackTrace.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() List
Serializes the exception, i.e. returns a list of items that can cross thread boundaries.
toString() String
A string representation of this object.
override

Operators

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

Static Methods

deserialize(List? data) SquadronException?
Deserializes a List that was produced by serialize.
from(Object error, [StackTrace? stackTrace, String? workerId, int? command]) SquadronException
This method returns error if it is a SquadronException (enriching it with workerId and command if it is a WorkerException). Otherwise, it returns a new WorkerException wrapping error and stackTrace.
fromString(String message) SquadronException?
loadStackTrace(String? stackTrace) StackTrace?
Deserializes a stackTrace if any. Ruturns null if no StackTrace is provided.
registerExceptionDeserializer(WorkerExceptionDeserializer deserializer) → void
Registers a deserializer for a custom WorkerException. If the deserializer is already registered, registering it again will have no effect.
unregisterExceptionDeserializer(WorkerExceptionDeserializer deserializer) → void
Unregisters a deserializer that was previously registered, does nothing otherwise. Please note that for a deregistration to have an effect, the exact same instance that was provided to registerExceptionDeserializer must be provided to this method; avoid passing lambdas, prefer passing static methods or top-level functions instead.