diff --git a/src/exceptions/file_IO_exception.h b/src/exceptions/file_IO_exception.h new file mode 100644 index 000000000..8f19652e6 --- /dev/null +++ b/src/exceptions/file_IO_exception.h @@ -0,0 +1,33 @@ +/* + * file_IO_exception.h + * + * Created on: 16.08.2012 + * Author: thomas + */ + +#ifndef MRMC_EXCEPTIONS_FILE_IO_EXCEPTION_H_ +#define MRMC_EXCEPTIONS_FILE_IO_EXCEPTION_H_ + +namespace mrmc { + +namespace exceptions { + +class file_IO_exception : public std::exception { + public: +#ifdef _WIN32 + file_IO_exception() : exception("::mrmc::file_IO_exception"){}; + file_IO_exception(const char * const s): exception(s) {}; +#else + file_IO_exception() {}; + file_IO_exception(const char * const s): exception() {}; +#endif + virtual const char* what() const throw(){ + { return "mrmc::file_IO_exception"; } + } +}; + +} + +} + +#endif /* MRMC_EXCEPTIONS_FILE_IO_EXCEPTION_H_ */ diff --git a/src/exceptions/wrong_file_format.h b/src/exceptions/wrong_file_format.h new file mode 100644 index 000000000..27ebbb45e --- /dev/null +++ b/src/exceptions/wrong_file_format.h @@ -0,0 +1,35 @@ +/* + * wrong_file_format.h + * + * Created on: 16.08.2012 + * Author: thomas + */ + +#ifndef WRONG_FILE_FORMAT_H_ +#define WRONG_FILE_FORMAT_H_ + +#include + +namespace mrmc { + +namespace exceptions { + +class wrong_file_format : public std::exception { + public: +#ifdef _WIN32 + wrong_file_format() : exception("::mrmc::wrong_file_format"){}; + wrong_file_format(const char * const s): exception(s) {}; +#else + wrong_file_format() {}; + wrong_file_format(const char * const s): exception() {}; +#endif + virtual const char* what() const throw(){ + { return "mrmc::wrong_file_format"; } + } +}; + +} //namespace exceptions + +} //namespace mrmc + +#endif /* WRONG_FILE_FORMAT_H_ */