Skip to content

Commit

Permalink
Merge pull request #5 from spiritinlife/master
Browse files Browse the repository at this point in the history
ConnectionEventListener null safety issue
  • Loading branch information
chinloyal authored Dec 14, 2020
2 parents bd51c21 + 08f6eb6 commit 2f90cae
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class ConnectionListener: ConnectionEventListener {
}
}

override fun onError(message: String, code: String, ex: Exception) {
override fun onError(message: String, code: String?, ex: Exception?) {
Handler(Looper.getMainLooper()).post {
try {
val connectionError = JSONObject(mapOf(
"message" to message,
"code" to code,
"exception" to ex.message
"exception" to ex?.message
))

debugLog("[ON_ERROR]: message: $message, code: $code")
Expand All @@ -57,4 +57,4 @@ class ConnectionListener: ConnectionEventListener {
}
}
}
}
}

0 comments on commit 2f90cae

Please sign in to comment.