diff --git a/wizard-client/wizard-client-libgdx/core/src/main/java/eu/jonahbauer/wizard/client/libgdx/Client.java b/wizard-client/wizard-client-libgdx/core/src/main/java/eu/jonahbauer/wizard/client/libgdx/Client.java index e58479c..dc64b1e 100644 --- a/wizard-client/wizard-client-libgdx/core/src/main/java/eu/jonahbauer/wizard/client/libgdx/Client.java +++ b/wizard-client/wizard-client-libgdx/core/src/main/java/eu/jonahbauer/wizard/client/libgdx/Client.java @@ -1,5 +1,6 @@ package eu.jonahbauer.wizard.client.libgdx; +import eu.jonahbauer.wizard.client.libgdx.screens.ErrorScreen; import eu.jonahbauer.wizard.client.libgdx.state.ClientState; import eu.jonahbauer.wizard.client.libgdx.state.Menu; import eu.jonahbauer.wizard.common.machine.TimeoutContext; @@ -33,7 +34,10 @@ public class Client extends TimeoutContext { @Override protected void handleError(Throwable t) { // TODO better error handling - log.error("", t); + log.error("An error occurred.", t); + + game.setScreen(new ErrorScreen(game, t.getMessage())); + error = true; var menu = new Menu(); forceTransition(menu);