From c194cf2001bea603dac1f869afd7a2eb5f8395af Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 21 Jul 2024 17:36:59 +0200 Subject: [PATCH] Catch all throwables for Window.Builder.build() --- .../main/java/de/staropensource/sosengine/testapp/Main.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java b/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java index bde2a5f..a9de5b0 100644 --- a/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java +++ b/testapp/src/main/java/de/staropensource/sosengine/testapp/Main.java @@ -20,7 +20,6 @@ package de.staropensource.sosengine.testapp; import de.staropensource.sosengine.base.Engine; -import de.staropensource.sosengine.base.exceptions.UnexpectedThrowableException; import de.staropensource.sosengine.base.logging.LoggerInstance; import de.staropensource.sosengine.base.types.CodePart; import de.staropensource.sosengine.base.types.logging.LogIssuer; @@ -119,8 +118,8 @@ public class Main { .setSize(new Vec2i(960, 540)) .setPosition(new Vec2i(10, 10)) .build(); - } catch (UnexpectedThrowableException exception) { - logger.crash("build() throw an UnexpectedThrowableException", exception.getThrowable()); + } catch (Throwable throwable) { + logger.crash("Window.Builder#build() failed", throwable); } // Sleep for five seconds