From 40de04a1fe15f2d55a3296a90bfd4abd81979c39 Mon Sep 17 00:00:00 2001 From: Thomas Heinemann Date: Sun, 19 Aug 2012 21:16:29 +0200 Subject: [PATCH] Added missing files (exceptions) --- src/exceptions/file_IO_exception.h | 33 ++++++++++++++++++++++++++++ src/exceptions/wrong_file_format.h | 35 ++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/exceptions/file_IO_exception.h create mode 100644 src/exceptions/wrong_file_format.h 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_ */