Skip to content

Commit

Permalink
Changed Generic Exception to Concrete Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedonboy committed Jan 21, 2021
1 parent 685f0b8 commit 32de74b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SocketComponentBackend {
* This property is a function that is in charge of a situation if a user is blocked
* */
var forceRoomUpdate = fun(_: String){
throw Exception("You must implement a forceUpdateListener. " +
throw UninitializedPropertyAccessException("You must implement a forceUpdateListener. " +
"<instance>.forceRoomUpdate = <your lambda function>")
}
fun stop() {
Expand Down Expand Up @@ -100,11 +100,11 @@ class SocketComponentBackend {
})
}

fun deleteMessage(messageId : String, cb : wsCallBack<Boolean>? = null){
fun deleteMessage(messageId : String){
_socket.emit(DELETE_MESSAGE, messageId)
}

fun editMessage(data : Message, cb : wsCallBack<Boolean>? = null){
fun editMessage(data : Message){
val jsonedMssg = _gson.toJson(data)
_socket.emit(EDIT_MESSAGE, JSONObject(jsonedMssg))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.fightpandemics.socketmanagerlib

import com.google.gson.JsonElement

//TODO("fill up the Object properties")
//TODO("fill up the Object properties from Backend Models")
data class Message(val content : String? = null, val authorId : String? = null){
val _id : String? = null
}
Expand Down

0 comments on commit 32de74b

Please sign in to comment.