#ifndef AUDIOFILEERROR_H 
#define AUDIOFILEERROR_H

#include <exception>
#include <string>

namespace ALWrapper {

class AudioFileError: public std::exception
{
        private:
                int errornumber;	//Error number.
                std::string message;	//Error message.
        public:
		AudioFileError(int err = 0) : errornumber(err) {}
                AudioFileError(int err, std::string msg) :
		errornumber(err), message(msg) {}

                virtual ~AudioFileError() throw() {}

                //This is overridden from its implementation in exception.
                virtual const char* what() const throw() {
                        //Returns an error description.
                        return message.c_str();
                }

                int getErrorNumber() const { return errornumber; }
};

typedef AudioFileError OggFileError;

}	//end namespace ALWrapper
#endif	//ifndef AUDIOFILEERROR_H

