mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Add documentation for HttpException
Corresponds with https://github.com/tachiyomiorg/extensions-lib/pull/12
This commit is contained in:
parent
1be7949275
commit
d1c956401c
1 changed files with 7 additions and 0 deletions
|
@ -143,4 +143,11 @@ fun <T> decodeFromJsonResponse(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exception that handles HTTP codes considered not successful by OkHttp.
|
||||||
|
* Use it to have a standardized error message in the app across the extensions.
|
||||||
|
*
|
||||||
|
* @since extensions-lib 1.5
|
||||||
|
* @param code [Int] the HTTP status code
|
||||||
|
*/
|
||||||
class HttpException(val code: Int) : IllegalStateException("HTTP error $code")
|
class HttpException(val code: Int) : IllegalStateException("HTTP error $code")
|
||||||
|
|
Loading…
Reference in a new issue