Skip to content

Commit

Permalink
Catch all SoundFile MP3 decoder exceptions for meaningful error messa…
Browse files Browse the repository at this point in the history
…ge (refs #32)
  • Loading branch information
kevinstadler committed May 21, 2019
1 parent 03b0a39 commit 884192d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/processing/sound/SoundFile.java
Expand Up @@ -75,6 +75,10 @@ public SoundFile(PApplet parent, String path) {
this.sample = new FloatSample(data, mp3.isStereo() ? 2 : 1);
} catch (IOException ee) {
throw ee;
} catch (NullPointerException ee) {
throw new IOException();
} catch (ArrayIndexOutOfBoundsException ee) {
throw new IOException();
} finally {
mp3.close();
}
Expand Down

0 comments on commit 884192d

Please sign in to comment.