Catch all throwables for Window.Builder.build()

This commit is contained in:
JeremyStar™ 2024-07-21 17:36:59 +02:00
parent 55091d3cd1
commit c194cf2001
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -20,7 +20,6 @@
package de.staropensource.sosengine.testapp; package de.staropensource.sosengine.testapp;
import de.staropensource.sosengine.base.Engine; 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.logging.LoggerInstance;
import de.staropensource.sosengine.base.types.CodePart; import de.staropensource.sosengine.base.types.CodePart;
import de.staropensource.sosengine.base.types.logging.LogIssuer; import de.staropensource.sosengine.base.types.logging.LogIssuer;
@ -119,8 +118,8 @@ public class Main {
.setSize(new Vec2i(960, 540)) .setSize(new Vec2i(960, 540))
.setPosition(new Vec2i(10, 10)) .setPosition(new Vec2i(10, 10))
.build(); .build();
} catch (UnexpectedThrowableException exception) { } catch (Throwable throwable) {
logger.crash("build() throw an UnexpectedThrowableException", exception.getThrowable()); logger.crash("Window.Builder#build() failed", throwable);
} }
// Sleep for five seconds // Sleep for five seconds