HttpError class

Inheritance

Constructors

HttpError.beforeReqError({String? msg, String? logMsg, Exception? exception})
HttpError.codeError({String successCode = '', String code = '', String msg = ''})
HttpError.dataError({String? msg, String? logMsg})
HttpError.dioError(DioException dioException)
处理dio报错
HttpError.emptyDataError({dynamic data = '', String msg = ''})
HttpError.noneError()
-------------------------------------------------------HttpError生成---------------------------------------------------
HttpError.parseDataError({String logMsg = '', Exception? exception, dynamic stack})
HttpError.requestMixError({Map<String, HttpError>? httpErrorMap, bool syncRequest = false})
HttpError.successButEmptyDataError({dynamic data = '', dynamic stack})
HttpError.unknown({Exception? exception, String logMsg = ''})
HttpError.urlError({String url = ''})

Properties

cause Exception?
getter/setter pairinherited
code int
getter/setter pairinherited
errorType ViewErrorType
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
logMsg String
打印给开发者的msg
getter/setter pairinherited
message String
可自定义,给用户的信息
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverCode String
服务器接口返回的code
getter/setter pairinherited
stack ↔ dynamic
getter/setter pairinherited

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