CSL_Exceptions.h

Go to the documentation of this file.
00001 //
00002 //  CSL_Exceptions.h -- the CSL Exception classes (specifications + implementations)
00003 //  See the copyright notice and acknowledgment of authors in the file COPYRIGHT
00004 //
00005 
00006 #ifndef CSL_EXCEPTIONS_H
00007 #define CSL_EXCEPTIONS_H
00008 
00009 #include <exception>        // Standard C++ exception library
00010 #include <string>   
00011 
00012 namespace csl {
00013 
00014 using namespace std;
00015 
00016 #ifndef CSL_ENUMS
00017 class exception { };            // needed for SWIG
00018 #endif
00019 
00023 class CException : public exception {
00024 public:
00025     string mMessage;
00026     CException(const string & msg) throw() : mMessage(msg) { };
00027     ~CException() throw() { };
00028 };
00029 
00033 class MemoryError : public CException {  
00034 public:
00035     MemoryError(const string & msg) : CException(msg) { };
00036 };
00037 
00041 class ValueError : public CException {  
00042 public:
00043     ValueError(const string & msg) : CException(msg) { };
00044 };
00045 
00049 class TimingError : public CException {  
00050 public:
00051     TimingError(const string & msg) : CException(msg) { };
00052 };
00053 
00057 class RunTimeError : public CException {  
00058 public:
00059     RunTimeError(const string & msg) : CException(msg) { };
00060 };
00061 
00065 class LogicError : public CException {  
00066 public:
00067     LogicError(const string & msg) : CException(msg) { };
00068 };
00069 
00073 class DomainError : public ValueError { 
00074 public:
00075     DomainError(const string & msg) : ValueError(msg) { };
00076 };
00077 
00081 class OutOfRangeError : public ValueError {  
00082 public:
00083     OutOfRangeError(const string & msg) : ValueError(msg) { };
00084 };
00085 
00089 class IOError : public ValueError {  
00090 public:
00091     IOError(const string & msg) : ValueError(msg) { };
00092 };
00093 
00094 }
00095 
00096 #endif

Generated on Fri Apr 6 20:18:12 2007 for CSL by  doxygen 1.4.5-20051010