# Package com.drake.net.exception

## Types

ConvertException
Link copied to clipboard
class ConvertException(response: Response, info: String, cause: Throwable?) : NetException
Content copied to clipboard
转换数据异常
DownloadFileException
Link copied to clipboard
class DownloadFileException(response: Response, info: String?, cause: Throwable?) : NetException
Content copied to clipboard
下载文件异常
NetCancellationException
Link copied to clipboard
class NetCancellationException(coroutineScope: CoroutineScope, message: String?) : CancellationException
Content copied to clipboard
取消网络任务的异常
NetConnectException
Link copied to clipboard
class NetConnectException(request: Request, cause: Throwable?) : NetException
Content copied to clipboard
NetException
Link copied to clipboard
open class NetException(request: Request, info: String?, cause: Throwable?) : IOException
Content copied to clipboard
Net网络异常
NetSocketTimeoutException
Link copied to clipboard
class NetSocketTimeoutException(request: Request, info: String?, cause: Throwable?) : NetException
Content copied to clipboard
NetUnknownHostException
Link copied to clipboard
class NetUnknownHostException(request: Request, cause: Throwable?) : NetException
Content copied to clipboard
NoCacheException
Link copied to clipboard
class NoCacheException(request: Request, info: String?, cause: Throwable?) : NetException
Content copied to clipboard
RequestParamsException
Link copied to clipboard
class RequestParamsException(response: Response) : NetException
Content copied to clipboard
400 - 499 客户端请求异常
ResponseException
Link copied to clipboard
class ResponseException(response: Response, info: String?) : NetException
Content copied to clipboard
如果返回200但是返回数据不符合业务要求可以抛出该异常
ServerResponseException
Link copied to clipboard
class ServerResponseException(response: Response) : NetException
Content copied to clipboard
`

    = 500 服务器异常

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

## Functions

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