Exception.hpp

00001 // This file is part of the imaging2 class library.
00002 //
00003 // University of Innsbruck, Infmath Imaging, 2009.
00004 // http://infmath.uibk.ac.at
00005 //
00006 // All rights reserved.
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

Generated on Tue Feb 10 10:01:29 2009 for imaging2 by  doxygen 1.5.5