v2.1.0: slightly improved error messages when rankings fail to load/save
This commit is contained in:
+3
-3
@@ -259,7 +259,7 @@ public class WelcomeScene extends PixelScene {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//if we encounter a fatal per-record error, then clear that record's data
|
//if we encounter a fatal per-record error, then clear that record's data
|
||||||
rec.gameData = null;
|
rec.gameData = null;
|
||||||
ShatteredPixelDungeon.reportException(e);
|
Game.reportException( new RuntimeException("Rankings Updating Failed!",e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Rankings.INSTANCE.latestDaily != null){
|
if (Rankings.INSTANCE.latestDaily != null){
|
||||||
@@ -269,7 +269,7 @@ public class WelcomeScene extends PixelScene {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//if we encounter a fatal per-record error, then clear that record's data
|
//if we encounter a fatal per-record error, then clear that record's data
|
||||||
Rankings.INSTANCE.latestDaily.gameData = null;
|
Rankings.INSTANCE.latestDaily.gameData = null;
|
||||||
ShatteredPixelDungeon.reportException(e);
|
Game.reportException( new RuntimeException("Rankings Updating Failed!",e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Collections.sort(Rankings.INSTANCE.records, Rankings.scoreComparator);
|
Collections.sort(Rankings.INSTANCE.records, Rankings.scoreComparator);
|
||||||
@@ -277,7 +277,7 @@ public class WelcomeScene extends PixelScene {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//if we encounter a fatal error, then just clear the rankings
|
//if we encounter a fatal error, then just clear the rankings
|
||||||
FileUtils.deleteFile( Rankings.RANKINGS_FILE );
|
FileUtils.deleteFile( Rankings.RANKINGS_FILE );
|
||||||
ShatteredPixelDungeon.reportException(e);
|
Game.reportException( new RuntimeException("Rankings Updating Failed!",e));
|
||||||
}
|
}
|
||||||
Dungeon.daily = Dungeon.dailyReplay = false;
|
Dungeon.daily = Dungeon.dailyReplay = false;
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class WndRanking extends WndTabbed {
|
|||||||
Rankings.INSTANCE.loadGameData( rec );
|
Rankings.INSTANCE.loadGameData( rec );
|
||||||
createControls();
|
createControls();
|
||||||
} catch ( Exception e ) {
|
} catch ( Exception e ) {
|
||||||
Game.reportException(e);
|
Game.reportException( new RuntimeException("Rankings Display Failed!",e));
|
||||||
Dungeon.hero = null;
|
Dungeon.hero = null;
|
||||||
createControls();
|
createControls();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user