Added try catch in case platform doesn't support opening URL in the browser

This commit is contained in:
Abdelilah El Aissaoui 2022-05-26 23:55:54 +02:00
parent 40366be75c
commit 332c3ef73d

View File

@ -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()
}
}