From a12f41f6126c6e0c5732b6516f0af04a61ccc328 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 25 Nov 2014 01:15:11 -0500 Subject: [PATCH] v0.2.3: changes to error handling for corrupted save information (should pop up with a more helpful error, instead of a crash). --- .../shatteredpixeldungeon/scenes/InterlevelScene.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java index 74614b22f..7f2cc98f9 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java @@ -52,8 +52,10 @@ public class InterlevelScene extends PixelScene { private static final String TXT_RETURNING = "Returning..."; private static final String TXT_FALLING = "Falling..."; - private static final String ERR_FILE_NOT_FOUND = "File not found. For some reason."; - private static final String ERR_GENERIC = "Something went wrong..." ; + private static final String ERR_FILE_NOT_FOUND = "Save file not found. If this error persists after restarting, " + + "it may mean this save game is corrupted. Sorry about that."; + private static final String ERR_IO = "Cannot read save file. If this error persists after restarting, " + + "it may mean this save game is corrupted. Sorry about that."; public static enum Mode { DESCEND, ASCEND, CONTINUE, RESURRECT, RETURN, FALL @@ -203,7 +205,7 @@ public class InterlevelScene extends PixelScene { } catch (IOException e ) { - error = ERR_GENERIC; + error = ERR_IO; }