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

@@ -149,7 +149,7 @@ public class Utils {
Cursor emptyCursor = new Cursor(min, min, min/2, min/2, 1, tmp, null);
container.setMouseCursor(emptyCursor, 0, 0);
} catch (LWJGLException e) {
Log.error("Failed to set the cursor.", e);
ErrorHandler.error("Failed to set the cursor.", e, true);
}
loadCursor();
@@ -181,7 +181,7 @@ public class Utils {
loadFont(FONT_MEDIUM, 3, colorEffect);
loadFont(FONT_SMALL, 1, colorEffect);
} catch (Exception e) {
Log.error("Failed to load fonts.", e);
ErrorHandler.error("Failed to load fonts.", e, true);
}
// initialize game images