Only catch handled exceptions in orx-osc

This commit is contained in:
Ricardo Matias
2019-11-08 13:52:16 +01:00
parent eb7c1d5f49
commit 4aecc3139a

View File

@@ -30,11 +30,10 @@ class OSC (
try { try {
sender.send(msg) sender.send(msg)
} catch (ex: Exception) { } catch (ex: PortUnreachableException) {
when(ex) { logger.error(ex) { "Error: Could not connect to OUT port" }
is PortUnreachableException -> logger.error(ex) { "Error: Could not connect to OUT port" } } catch (ex: IllegalStateException) {
is IllegalStateException -> logger.error(ex) { "Error: Couldn't send message to channel: $channel" } logger.error(ex) { "Error: Couldn't send message to channel: $channel" }
}
} }
} }