]> git.tdb.fi Git - libs/al.git/blobdiff - source/oggdecoder.h
Add dedicated exception classes for decoding sounds
[libs/al.git] / source / oggdecoder.h
index a3f5504c4c00bac79a4d46f61ea703c13e6eabc0..49cadbb1bea56f3c29b40cd59f4b5f117ca9728f 100644 (file)
@@ -1,11 +1,23 @@
 #ifndef MSP_AL_OGGDECODER_H_
 #define MSP_AL_OGGDECODER_H_
 
+#include <stdexcept>
 #include "sounddecoder.h"
 
 namespace Msp {
 namespace AL {
 
+class ogg_error: public std::runtime_error
+{
+public:
+       ogg_error(const std::string &, int);
+       virtual ~ogg_error() throw() { }
+
+private:
+       static std::string get_message(int);
+};
+
+
 class OggDecoder: public SoundDecoder
 {
 private: