AdapterException class

适配器异常基类

统一不同网络库的异常类型

Implemented types

Constructors

AdapterException({required String message, required AdapterExceptionType type, int? statusCode, AdapterResponse? response, dynamic originalError, StackTrace? stackTrace})
AdapterException.cancel({String? message, dynamic originalError, StackTrace? stackTrace})
创建取消异常
factory
AdapterException.connectionError({String? message, dynamic originalError, StackTrace? stackTrace})
创建连接错误异常
factory
AdapterException.connectTimeout({String? message, dynamic originalError, StackTrace? stackTrace})
创建连接超时异常
factory
AdapterException.receiveTimeout({String? message, dynamic originalError, StackTrace? stackTrace})
创建接收超时异常
factory
AdapterException.response({required int statusCode, String? message, AdapterResponse? response, dynamic originalError, StackTrace? stackTrace})
创建响应错误异常
factory
AdapterException.sendTimeout({String? message, dynamic originalError, StackTrace? stackTrace})
创建发送超时异常
factory
AdapterException.unknown({String? message, dynamic originalError, StackTrace? stackTrace})
创建未知错误异常
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
错误消息
final
originalError → dynamic
原始错误对象
final
response AdapterResponse?
响应对象(如果有)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
堆栈跟踪
final
statusCode int?
HTTP 状态码(如果有)
final
type AdapterExceptionType
异常类型
final

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