Only catch handled exceptions in orx-osc
This commit is contained in:
@@ -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" }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user