[shuttle_p]
[网络接口失败添加错误处理]
This commit is contained in:
yangyakun
2024-01-18 17:10:48 +08:00
parent 7e95e4de92
commit 657fb9eb29
4 changed files with 8 additions and 5 deletions

View File

@@ -14,5 +14,8 @@ public interface OchCommonServiceCallback< T > {
default void onError() {
}
default void onError(String msg) {
}
}

View File

@@ -25,7 +25,7 @@ class OchCommonSubscribeImpl<T : BaseData>(
override fun onError(e: Throwable) {
super.onError(e)
CallerLogger.e("$flavorTag$TAG", "$apiName: onError() ${e.message}")
callback?.onError()
callback?.onError("$apiName: onError() ${e.message}")
}
override fun onError(message: String, code: Int) {