UtilException.h
Go to the documentation of this file.
1 /**
2  * \file UtilException.h
3  *
4  * \ingroup Utilities
5  *
6  * \brief Class def header for exception classes used in GeometryUtilities
7  *
8  * @author kazuhiro
9  */
10 
11 /** \addtogroup Util
12 
13  @{*/
14 #ifndef UTILEXCEPTION_HH
15 #define UTILEXCEPTION_HH
16 
17 #include <string>
18 #include <exception>
19 
20 namespace util {
21  /**
22  \class UtilException
23  Generic (base) exception class
24  */
25  class UtilException : public std::exception{
26 
27  public:
28 
30  {
31  _msg = "\033[93m";
32  _msg += msg;
33  _msg += "\033[00m";
34  }
35 
36  virtual ~UtilException() throw(){};
37  virtual const char* what() const throw()
38  { return _msg.c_str(); }
39 
40  private:
41 
43  };
44 
45 }
46 #endif
47 /** @} */ // end of doxygen group
Namespace for general, non-LArSoft-specific utilities.
void msg(const char *fmt,...)
Definition: message.cpp:107
std::string string
Definition: nybbler.cc:12
STL namespace.
virtual ~UtilException()
Definition: UtilException.h:36
UtilException(std::string msg="")
Definition: UtilException.h:29
virtual const char * what() const
Definition: UtilException.h:37
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33