|
|
|
@ -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<ClientState, Client> {
|
|
|
|
|
@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);
|
|
|
|
|