Skip to content

Commit

Permalink
added try-catch to default in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
Talha Ali committed Mar 11, 2024
1 parent f30971b commit 4ab68f5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ internal class PairingProtocol(private val koinApp: KoinApplication = wcKoinApp)
}

override fun validatePairingUri(uri: String): Boolean {
return Validator.validateWCUri(uri) != null
return try {
Validator.validateWCUri(uri) != null
} catch (e: Exception) {
false
}
}

private suspend fun awaitConnection(onConnection: () -> Unit, errorLambda: (Throwable) -> Unit = {}) {
Expand Down

0 comments on commit 4ab68f5

Please sign in to comment.