소스 검색

Add documentation for HttpException

Corresponds with https://github.com/tachiyomiorg/extensions-lib/pull/12

arkon 1 년 전
부모
커밋
d1c956401c
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt

+ 7 - 0
core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt

@@ -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")