Package com.drake.net.exception

Types

ConvertException
Link copied to clipboard
class ConvertException(response: Response, message: String?, cause: Throwable?, tag: Any?) : HttpResponseException
转换数据异常
DownloadFileException
Link copied to clipboard
class DownloadFileException(response: Response, message: String?, cause: Throwable?, tag: Any?) : HttpResponseException
下载文件异常
HttpFailureException
Link copied to clipboard
open class HttpFailureException(request: Request, message: String?, cause: Throwable?) : NetException
实现该接口表示Http请求失败
HttpResponseException
Link copied to clipboard
open class HttpResponseException(response: Response, message: String?, cause: Throwable?) : NetException
实现该接口表示Http请求成功
NetCancellationException
Link copied to clipboard
class NetCancellationException(coroutineScope: CoroutineScope, message: String?) : CancellationException
取消网络任务的异常
NetConnectException
Link copied to clipboard
class NetConnectException(request: Request, message: String?, cause: Throwable?) : HttpFailureException
NetException
Link copied to clipboard
open class NetException(request: Request, message: String?, cause: Throwable?) : IOException
Net网络异常
NetSocketTimeoutException
Link copied to clipboard
class NetSocketTimeoutException(request: Request, message: String?, cause: Throwable?) : HttpFailureException
NetUnknownHostException
Link copied to clipboard
class NetUnknownHostException(request: Request, message: String?, cause: Throwable?) : HttpFailureException
NoCacheException
Link copied to clipboard
class NoCacheException(request: Request, message: String?, cause: Throwable?) : NetException
RequestParamsException
Link copied to clipboard
class RequestParamsException(response: Response, message: String?, cause: Throwable?, tag: Any?) : HttpResponseException
400 - 499 客户端请求异常
ResponseException
Link copied to clipboard
class ResponseException(response: Response, message: String?, cause: Throwable?, tag: Any?) : HttpResponseException
状态码在200..
ServerResponseException
Link copied to clipboard
class ServerResponseException(response: Response, message: String?, cause: Throwable?, tag: Any?) : HttpResponseException

= 500 服务器异常

URLParseException
Link copied to clipboard
open class URLParseException(message: String?, cause: Throwable?) : Exception
URL地址错误

Functions

NetCancellationException
Link copied to clipboard
fun CoroutineScope.NetCancellationException(message: String? = null): NetCancellationException
抛出该异常将取消作用域内所有的网络请求