v0.2.3: changed how some of the code deals with exception. More visible errors, but better error reporting. These methods should never fail for any reason other than an IOException anyway, so the intent here is that if they do fail for another reason, it is worth one user's game session so that I can get a bug report.

This commit is contained in:
Evan Debenham
2014-12-02 14:26:34 -05:00
parent 0014888514
commit ddc3786b44
3 changed files with 10 additions and 9 deletions
@@ -382,9 +382,9 @@ public class Dungeon {
observe();
try {
saveAll();
} catch (Exception e) {
//TODO: I need to add analytics code to this or something.
//Silent failure is really bad, don't want to interrupt the user but I do want to know if this fails.
} catch (IOException e) {
/*This only catches IO errors. Yes, this means things can do wrong, and they can go wrong catastrophically.
But when they do the user will get a nice 'report this issue' dialogue, and I can fix the bug.*/
}
}
@@ -527,7 +527,7 @@ public class Dungeon {
Bundle.write( bundle, output );
output.close();
} catch (Exception e) {
} catch (IOException e) {
GamesInProgress.setUnknown( hero.heroClass );
}