Skip to content

Commit

Permalink
🥅 Catch all exceptions when trying to load a default track icon
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Fihlon <[email protected]>
  • Loading branch information
McPringle committed Nov 4, 2024
1 parent 9c891f7 commit f7018d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/swiss/fihlon/apus/event/Track.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -52,7 +50,7 @@ private static Track defaultTrack(@NotNull final String svgFileName) {
final Path path = Paths.get(uri);
final String svgCode = Files.readString(path);
return new Track(svgCode.trim());
} catch (final IOException | NullPointerException | URISyntaxException e) {
} catch (final Exception e) {
LOGGER.error("Unable to load default track icon '{}': {}", svgFileName, e.getMessage(), e);
}
return NONE;
Expand Down

0 comments on commit f7018d4

Please sign in to comment.