v2.1.0: slightly improved error messages when rankings fail to load/save

This commit is contained in:
Evan Debenham
2023-05-16 13:06:46 -04:00
parent b8f623b2c2
commit c38a508465
2 changed files with 4 additions and 4 deletions

View File

@@ -259,7 +259,7 @@ public class WelcomeScene extends PixelScene {
} catch (Exception e) {
//if we encounter a fatal per-record error, then clear that record's data
rec.gameData = null;
ShatteredPixelDungeon.reportException(e);
Game.reportException( new RuntimeException("Rankings Updating Failed!",e));
}
}
if (Rankings.INSTANCE.latestDaily != null){
@@ -269,7 +269,7 @@ public class WelcomeScene extends PixelScene {
} catch (Exception e) {
//if we encounter a fatal per-record error, then clear that record's data
Rankings.INSTANCE.latestDaily.gameData = null;
ShatteredPixelDungeon.reportException(e);
Game.reportException( new RuntimeException("Rankings Updating Failed!",e));
}
}
Collections.sort(Rankings.INSTANCE.records, Rankings.scoreComparator);
@@ -277,7 +277,7 @@ public class WelcomeScene extends PixelScene {
} catch (Exception e) {
//if we encounter a fatal error, then just clear the rankings
FileUtils.deleteFile( Rankings.RANKINGS_FILE );
ShatteredPixelDungeon.reportException(e);
Game.reportException( new RuntimeException("Rankings Updating Failed!",e));
}
Dungeon.daily = Dungeon.dailyReplay = false;

View File

@@ -88,7 +88,7 @@ public class WndRanking extends WndTabbed {
Rankings.INSTANCE.loadGameData( rec );
createControls();
} catch ( Exception e ) {
Game.reportException(e);
Game.reportException( new RuntimeException("Rankings Display Failed!",e));
Dungeon.hero = null;
createControls();
}