HttpError class

Implemented types

Constructors

HttpError(HttpErrorType httpErrorType, String message, Exception cause, String logMsg)
HttpError.codeError(dynamic successCode, dynamic code, {String? msg})
HttpError.dataError({String? msg, String? logMsg})
HttpError.dioError(DioError error)
处理dio报错
HttpError.emptyDataError(dynamic data)
-------------------------------------------------------HttpError生成---------------------------------------------------
HttpError.emptyMixError(Map<String, HttpError> httpErrorMap, bool syncRequest)
HttpError.parseDataError(dynamic e, {String? logMsg})
HttpError.unknown(dynamic e, {String? logMsg})
HttpError.urlError(String? url)

Properties

cause ↔ Exception
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
httpErrorType ↔ HttpErrorType
getter/setter pair
logMsg ↔ String
打印给开发者的msg
getter/setter pair
message ↔ String
可自定义,给用户的信息
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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