00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef CORE_EXCEPTION_H
00010 #define CORE_EXCEPTION_H
00011
00012 #include <iostream>
00013
00014 namespace imaging
00015 {
00021 class Exception
00022 {
00023 std::string _error_msg;
00024
00025 public:
00027 Exception(std::string msg = std::string("Exception: An exception has ocurred!")) : _error_msg(msg) {}
00028
00030 const std::string & error_msg() const { return _error_msg; }
00031 };
00032
00038 class MathException : public Exception
00039 {
00040 public:
00042 MathException(std::string msg = std::string("MathException: An exception has ocurred!")) :
00043 Exception(msg) {}
00044 };
00045
00051 class FileIoException : public Exception
00052 {
00053 public:
00055 FileIoException(std::string msg = std::string("FileIoException: An exception has ocurred!")) :
00056 Exception(msg) {}
00057 };
00058 }
00059
00060 #endif