Prevent crashes when loading invalid or otherwise problematic songs.

This commit is contained in:
EnderKill98 2023-06-16 18:06:05 +02:00
parent ad8f94ee27
commit 239e4f03f4

View File

@ -29,8 +29,8 @@ public class SongLoader {
Song song = null;
try {
song = loadSong(file);
} catch (IOException exception) {
Main.LOGGER.error("Unable to read song "+file.getName(), exception);
} catch (Exception exception) {
Main.LOGGER.error("Unable to read or parse song " + file.getName(), exception);
}
if (song != null) SONGS.add(song);
}