gracefully handle error when loading all beatmaps (close #110)

This commit is contained in:
yugecin 2016-12-13 15:22:23 +01:00
parent 18e1ef1fcd
commit d9669ddcd5

View File

@ -151,7 +151,12 @@ public class BeatmapParser {
// Parse hit objects only when needed to save time/memory.
// Change boolean to 'true' to parse them immediately.
Beatmap beatmap = parseFile(file, dir, beatmaps, false);
Beatmap beatmap = null;
try {
beatmap = parseFile(file, dir, beatmaps, false);
} catch(Exception e) {
Log.error("could not parse beatmap " + file.getName() + ": " + e.getMessage()); // TODO: show right bottom notification
}
// add to parsed beatmap list
if (beatmap != null) {