diff --git a/examples/src/Main.cpp b/examples/src/Main.cpp index b4f87fb..530fe71 100644 --- a/examples/src/Main.cpp +++ b/examples/src/Main.cpp @@ -69,11 +69,13 @@ int main() //Block-split-stereo-ima4-reaper.wav //auto result = loader.Load(fileData, "test_data/ad_hoc/TestBeat_44_16_mono-ima4-reaper.wav"); - auto result = loader.Load(fileData, "test_data/ad_hoc/TestBeat_44_16_stereo-ima4-reaper.wav"); - - std::cout << "[Debug] Loader Status: " << result << std::endl; + loader.Load(fileData, "test_data/ad_hoc/TestBeat_44_16_stereo-ima4-reaper.wavp"); } - catch (std::exception e) + catch(const UnsupportedExtensionException & e) + { + std::cerr << "Caught: " << e.what() << std::endl; + } + catch (const std::exception & e) { std::cerr << "Caught: " << e.what() << std::endl; std::exit(1); diff --git a/include/libnyquist/AudioDecoder.h b/include/libnyquist/AudioDecoder.h index d665077..8b3b292 100644 --- a/include/libnyquist/AudioDecoder.h +++ b/include/libnyquist/AudioDecoder.h @@ -35,11 +35,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace nqr { - struct UnsupportedExtensionException : public std::runtime_error - { - UnsupportedExtensionException() : std::runtime_error("Unsupported file extension") {} - }; - +struct UnsupportedExtensionException : public std::runtime_error +{ + UnsupportedExtensionException() : std::runtime_error("Unsupported file extension") {} +}; + +// Tofix: // Individual decoder classes will throw std::exceptions for bad things, // but NyquistIO implements this enum for high-level error notifications. enum IOError