Background: I’m writing an AudioFormat based on the mpg123 library. There are possibilities for errors and I’m contemplating how to deal with them.
These errors involve the mp3 library being misconfigured or being unable to get the (very small) amount of memory it needs for its own purposes.
I’m thinking that this is a good use for exceptions - because this isn’t something I can really recover from gracefully at all, and because this most likely means that everything else is screwed up as well. I’m a little trepidatious because I’ve never dealt with exceptions in C++, but my code should all be exception safe, and anyway, by the time I throw these exceptions, we’re in a sorry state.
Anything I should know about JUCE and exceptions? In particular, I want to be sure that an exception will cause a JUCE application to fail…