This commit is contained in:
zhongchao
2021-11-05 23:02:54 +08:00
parent 6c094debd8
commit 88170bb515
93 changed files with 1439 additions and 325 deletions

View File

@@ -1,15 +0,0 @@
package com.mogo.chat.exception
class ApiException : CommonException {
companion object {
val NULL_REQUEST_DATA_API_EXCEPTION = ApiException(2, "request data is null")
val ENTER_ROOM_API_EXCEPTION = ApiException(3, "roomId is null or already enter room")
}
constructor(code: Int, msg: String) : super(code, msg)
fun getErrorMsg():String{
return msg
}
}

View File

@@ -0,0 +1,15 @@
package com.mogo.chat.exception
class CallApiException : CommonException {
companion object {
val ENTER_ROOM_API_EXCEPTION = CallApiException(3, "roomId is null or already enter room")
}
constructor(code: Int, msg: String) : super(code, msg)
fun getErrorMsg():String{
return msg
}
}

View File

@@ -5,6 +5,7 @@ open class CommonException :Exception{
companion object{
val NETWORK_EXCEPTION = CommonException(1, "network is error")
val NULL_EXCEPTION = CommonException(1, "exception is null")
val NULL_REQUEST_DATA_API_EXCEPTION = CommonException(1, "request data is null")
}
protected var code: Int = 0