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;
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