00001
00002
00003 #ifndef BASEEXCEPTION_H
00004 #define BASEEXCEPTION_H
00005
00006 #include <iostream>
00007 #include <string>
00008
00009 namespace SctPixelRod {
00010
00011 enum exceptType {BASE, VME, NOIMAGEFILE, HPI, ROD, PRIMLIST, TIM, BOC};
00012
00013
00014
00029 class BaseException {
00030 public:
00031 BaseException(std::string descriptor);
00032 std::string getDescriptor() {return m_descriptor;};
00033 unsigned long getNumData() {return m_numData;};
00034 void setType(exceptType type) {m_type = type; return;};
00035 exceptType getType() {return m_type;};
00036 virtual void what(std::ostream&);
00037 virtual ~BaseException(){}
00038
00039 private:
00040 std::string m_descriptor;
00041 unsigned long m_numData;
00042 exceptType m_type;
00043 };
00044
00045 };
00046
00047
00048
00049
00050
00051 std::ostream& operator<<(std::ostream& os, SctPixelRod::BaseException& e);
00052
00053 #endif // BASEEXCEPTION_H