Added ErrorHandler class to handle all critical errors.

This mostly replaces the Slick2D Log class for error reporting.  Most game errors will now trigger the error popup.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-01-15 21:55:26 -05:00
parent f8dad2889f
commit 553f091693
11 changed files with 192 additions and 71 deletions

View File

@@ -23,7 +23,6 @@ import java.util.Collections;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.util.Log;
/**
* Game mods.
@@ -131,7 +130,7 @@ public enum GameMod {
this.button = new MenuButton(img, x + (offsetX * id), y);
this.button.setHoverScale(1.15f);
} catch (SlickException e) {
Log.error(String.format("Failed to initialize game mod '%s'.", this), e);
ErrorHandler.error(String.format("Failed to initialize game mod '%s'.", this), e, false);
}
}