AppException class
自定义异常
异常大体分为以下几种:网络异常、客户端请求异常、服务端异常 客户端异常:又可拆分两种常见的异常:请求参数或路径错误,鉴权失败/token失效
- Implementers
Constructors
- AppException.new(int _code, String _message, {dynamic responseData})
- AppException.create(DioException error)
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- responseData ↔ dynamic
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getCode(
) → int -
getMessage(
) → String -
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
Constants
- CANCEL_ERROR → const int
- DATE_FALSE_ERROR → const int
- TIMEOUT_ERROR → const int
- unknown_error → const int