将车聊聊工程代码加入到项目中,保证能跑起来了,后续做架构升级

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-10-25 20:29:09 +08:00
parent 3bfad3d31f
commit 17f17ba459
348 changed files with 16837 additions and 9 deletions

View File

@@ -0,0 +1,15 @@
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,18 @@
package com.mogo.chat.exception
open class CommonException :Exception{
companion object{
val NETWORK_EXCEPTION = CommonException(1, "network is error")
val NULL_EXCEPTION = CommonException(1, "exception is null")
}
protected var code: Int = 0
protected var msg: String = ""
constructor(code: Int, msg: String) : super(msg) {
this.code = code
this.msg = msg
}
}