00001
00014 #ifndef DBEXCEPTION_HH
00015 #define DBEXCEPTION_HH
00016
00017 #include <iostream>
00018 #include <exception>
00019
00020 namespace larutil {
00025 class LArUtilException : public std::exception{
00026
00027 public:
00028
00029 LArUtilException(std::string msg="") : std::exception()
00030 {
00031 _msg = "\033[93m";
00032 _msg += msg;
00033 _msg += "\033[00m";
00034 }
00035
00036 virtual ~LArUtilException() throw(){};
00037 virtual const char* what() const throw()
00038 { return _msg.c_str(); }
00039
00040 private:
00041
00042 std::string _msg;
00043 };
00044
00045 }
00046 #endif
00047
00048