@@ -0,0 +1,19 @@
|
||||
package com.zhidao.roadcondition.exception
|
||||
|
||||
|
||||
class ApiException : Exception {
|
||||
|
||||
companion object{
|
||||
val NETWORK_API_EXCEPTION = ApiException(1, "network is error")
|
||||
val NULL_REQUEST_DATA_API_EXCEPTION = ApiException(2, "request data is null")
|
||||
}
|
||||
|
||||
private var code: Int = 0
|
||||
private var msg: String = ""
|
||||
|
||||
constructor(code: Int, msg: String) : super(msg) {
|
||||
this.code = code
|
||||
this.msg = msg
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user