also handle Errors from java

This commit is contained in:
Aria Moradi 2021-05-16 23:58:32 +04:30
parent 2364960388
commit f464087c30
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ fun applicationSetup() {
if (serverConfig.systemTrayEnabled) {
try {
systemTray
} catch (e: Exception) {
} catch (e: Throwable) { // cover both java.lang.Exception and java.lang.Error
e.printStackTrace()
}
}

View File

@ -20,7 +20,7 @@ import kotlin.system.exitProcess
fun openInBrowser() {
try {
Desktop.browseURL("http://127.0.0.1:4567")
} catch (e: Exception) {
} catch (e: Throwable) { // cover both java.lang.Exception and java.lang.Error
e.printStackTrace()
}
}