|
@@ -14,10 +14,7 @@ import android.app.Dialog
|
|
|
import android.widget.Toast
|
|
|
import androidx.fragment.app.FragmentActivity
|
|
|
import com.drake.brv.PageRefreshLayout
|
|
|
-import com.drake.net.error.ParseJsonException
|
|
|
-import com.drake.net.error.RequestParamsException
|
|
|
-import com.drake.net.error.ResponseException
|
|
|
-import com.drake.net.error.ServerResponseException
|
|
|
+import com.drake.net.error.*
|
|
|
import com.drake.net.observer.DialogObserver
|
|
|
import com.drake.net.observer.PageObserver
|
|
|
import com.yanzhenjie.kalle.Kalle
|
|
@@ -45,6 +42,7 @@ object NetConfig {
|
|
|
is ReadException -> app.getString(R.string.read_exception)
|
|
|
is ParseError -> app.getString(R.string.parse_error)
|
|
|
is ParseJsonException -> app.getString(R.string.parse_json_error)
|
|
|
+ is JsonStructureException -> app.getString(R.string.json_structure_error)
|
|
|
is RequestParamsException -> app.getString(R.string.request_error)
|
|
|
is ServerResponseException -> app.getString(R.string.server_error)
|
|
|
is ResponseException -> msg
|
|
@@ -56,7 +54,6 @@ object NetConfig {
|
|
|
|
|
|
Toast.makeText(app, message, Toast.LENGTH_SHORT).show()
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|