Merge pull request #26 from NekoSunflower/master

允许外部代码从Api异常中获取原始响应体
This commit is contained in:
czp
2020-01-24 14:22:43 +08:00
committed by GitHub

View File

@@ -7,5 +7,5 @@ import java.io.IOException
* 当服务器返回的 code 不等于 0 时抛出
*/
class BilibiliApiException(
commonResponse: CommonResponse
) : IOException(commonResponse.message?.takeIf { it.isNotEmpty() } ?: commonResponse.msg)
val commonResponse: CommonResponse
) : IOException(commonResponse.message?.takeIf { it.isNotEmpty() } ?: commonResponse.msg)