00001 #ifndef NPSTAT_EXCEPTION_HH_ 00002 #define NPSTAT_EXCEPTION_HH_ 00003 00014 #include <string> 00015 00016 #include "FWCore/Utilities/interface/Exception.h" 00017 00018 namespace npstat { 00020 struct NpstatException : public cms::Exception 00021 { 00022 inline NpstatException() : cms::Exception("npstat::NpstatException") {} 00023 00024 inline explicit NpstatException(const std::string& description) 00025 : cms::Exception(description) {} 00026 00027 inline explicit NpstatException(const char* description) 00028 : cms::Exception(description) {} 00029 00030 virtual ~NpstatException() throw() {} 00031 }; 00032 00033 struct NpstatOutOfRange : public NpstatException 00034 { 00035 inline NpstatOutOfRange() : NpstatException("npstat::NpstatOutOfRange") {} 00036 00037 inline explicit NpstatOutOfRange(const std::string& description) 00038 : NpstatException(description) {} 00039 00040 virtual ~NpstatOutOfRange() throw() {} 00041 }; 00042 00043 struct NpstatInvalidArgument : public NpstatException 00044 { 00045 inline NpstatInvalidArgument() : NpstatException("npstat::NpstatInvalidArgument") {} 00046 00047 inline explicit NpstatInvalidArgument(const std::string& description) 00048 : NpstatException(description) {} 00049 00050 virtual ~NpstatInvalidArgument() throw() {} 00051 }; 00052 00053 struct NpstatRuntimeError : public NpstatException 00054 { 00055 inline NpstatRuntimeError() : NpstatException("npstat::NpstatRuntimeError") {} 00056 00057 inline explicit NpstatRuntimeError(const std::string& description) 00058 : NpstatException(description) {} 00059 00060 virtual ~NpstatRuntimeError() throw() {} 00061 }; 00062 00063 struct NpstatDomainError : public NpstatException 00064 { 00065 inline NpstatDomainError() : NpstatException("npstat::NpstatDomainError") {} 00066 00067 inline explicit NpstatDomainError(const std::string& description) 00068 : NpstatException(description) {} 00069 00070 virtual ~NpstatDomainError() throw() {} 00071 }; 00072 } 00073 00074 #endif // NPSTAT_EXCEPTION_HH_