orsjb / beads

The Beads project.
138 stars 38 forks source link

SampleManager.sample() should throw Exception if cannot load file #6

Closed ceefour closed 4 years ago

ceefour commented 9 years ago

I tried to load an OGG file using SampleManager.sample() and it silently returned null.

It should throw Exception giving some reason (unsupported format, etc.), possibly wrapping an underlying exception, of what went wrong.

orsjb commented 9 years ago

This is true. If you load your samples using Sample, rather than SampleManager, you do get the exception. There was some logic to me originally deciding to swallow the exception, but I can't see it any more. SampleManager does have a "vebose" flag, but I agree the behaviour needs to be fixed.

cwong4311 commented 4 years ago

This issue has now been resolved and will be made available in the next release (v3.2)

SampleManager will now correctly return error messages and exceptions when loading a sample fails.