00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CALCIUM_EXCEPTION_HXX
00028 #define CALCIUM_EXCEPTION_HXX
00029
00030 #if defined(__CONST_H) || defined(__CALCIUM_H)
00031 #error "The header CalciumException.hxx must be included before calcium.h"
00032 #endif
00033
00034 #include "DSC_Exception.hxx"
00035 #include "CalciumTypes.hxx"
00036 #include <string>
00037
00038 struct CalciumException : public DSC_Exception {
00039
00040 CalciumException( const CalciumTypes::InfoType info,
00041 const std::string & text,
00042 const char *fileName,
00043 const unsigned int lineNumber,
00044 const char *funcName):
00045 DSC_Exception(text,fileName,lineNumber,funcName),
00046 _info(info),_exceptionName("CalciumException")
00047 {};
00048
00049
00050 CalciumException( const CalciumTypes::InfoType info,
00051 const std::string & text ):
00052 DSC_Exception(text),_info(info),_exceptionName("CalciumException")
00053 {};
00054
00055 CalciumException(CalciumTypes::InfoType info, const DSC_Exception & ex ):
00056 DSC_Exception(ex),_info(info),_exceptionName("CalciumException")
00057 {};
00058
00059 virtual ~CalciumException() throw() {};
00060 CalciumTypes::InfoType getInfo() const { return _info;}
00061 void setInfo(CalciumTypes::InfoType info) {_info=info;}
00062 virtual const std::string & getExceptionName() const {return _exceptionName;};
00063
00064 protected:
00065 CalciumTypes::InfoType _info;
00066 std::string _exceptionName;
00067 };
00068
00069
00070 #endif