StreamDioException class
A DioException carrying the StreamException that caused it.
Dio requires rejections to be DioExceptions, so the mapped exception rides in exception until runApiSafely unwraps it at the call seam.
- Inheritance
-
- Object
- DioException
- StreamDioException
- Available extensions
Constructors
- StreamDioException({required StreamException exception, required RequestOptions requestOptions, Response? response, DioExceptionType type = DioExceptionType.unknown, StackTrace? stackTrace, String? message})
-
Creates a StreamDioException carrying
exception.
Properties
- error → Object?
-
The original error/exception object;
It's usually not null when
typeis DioExceptionType.unknown.finalinherited - exception → StreamException
-
The Stream exception this Dio exception delivers.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
The error message that throws a DioException.
finalinherited
- requestOptions → RequestOptions
-
The request info for the request that throws exception.
finalinherited
- response → Response?
-
Response info, it may be
nullif the request can't reach to the HTTP server, for example, occurring a DNS error, network is not available.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace
-
The stacktrace of the original error/exception object;
It's usually not null when
typeis DioExceptionType.unknown.finalinherited - stringBuilder ↔ DioExceptionReadableStringBuilder?
-
Each exception can be override with a customized builder or fallback to
the default DioException.readableStringBuilder.
getter/setter pairinherited
- type → DioExceptionType
-
finalinherited
Methods
-
copyWith(
{RequestOptions? requestOptions, Response? response, DioExceptionType? type, Object? error, StackTrace? stackTrace, String? message}) → DioException -
Generate a new DioException by combining given values and original values.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toStreamException(
) → StreamException -
Available on DioException, provided by the DioExceptionMapping extension
This failure as the StreamException it represents. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited