JuiceTimeoutException class
Exception for timeout errors.
Use this when operations exceed their allowed time.
try {
await operation.timeout(Duration(seconds: 30));
} on TimeoutException catch (e) {
throw JuiceTimeoutException(
'Operation timed out',
duration: Duration(seconds: 30),
cause: e,
);
}
- Inheritance
-
- Object
- JuiceException
- JuiceTimeoutException
Constructors
- JuiceTimeoutException(String message, {Duration? duration, Object? cause, StackTrace? stackTrace})
-
Creates a JuiceTimeoutException.
const
Properties
- cause → Object?
-
The underlying error that caused this exception, if any.
finalinherited
- duration → Duration?
-
The timeout duration that was exceeded.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNetworkError → bool
-
Whether this is a network-related error.
no setterinherited
- isRetryable → bool
-
Timeouts are generally retryable.
no setteroverride
- isTimeoutError → bool
-
Whether this is a timeout error.
no setteroverride
- isValidationError → bool
-
Whether this is a validation error.
no setterinherited
- message → String
-
Human-readable error message.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The stack trace where this exception occurred.
finalinherited
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