From 79b3fb6de4217c256c4d049559ffed97b01a3d8a Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 25 Jun 2021 16:46:18 +0300 Subject: [PATCH] Resolved #4151 - Discord library load will now catch failed attempts properly --- desktop/src/com/unciv/app/desktop/DesktopLauncher.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt index 877157a4d5..7522c4b38d 100644 --- a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt +++ b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt @@ -215,7 +215,8 @@ internal object DesktopLauncher { } catch (ex: Exception) { } } - } catch (ex: Exception) { + } catch (ex: Throwable) { + // This needs to be a Throwable because if we can't find the discord_rpc library, we'll get a UnsatisfiedLinkError, which is NOT an exception. println("Could not initialize Discord") } }