Added try catch in case platform doesn't support opening URL in the browser
This commit is contained in:
parent
40366be75c
commit
332c3ef73d
@ -9,5 +9,10 @@ val systemSeparator: String by lazy {
|
||||
}
|
||||
|
||||
fun openUrlInBrowser(url: String) {
|
||||
try {
|
||||
Desktop.getDesktop().browse(URI(url))
|
||||
} catch (ex: Exception) {
|
||||
println("Failed to open URL in browser")
|
||||
ex.printStackTrace()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user