LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
UtilException.h
Go to the documentation of this file.
1 
14 #ifndef UTILEXCEPTION_HH
15 #define UTILEXCEPTION_HH
16 
17 #include <exception>
18 #include <string>
19 
20 namespace util {
25  class UtilException : public std::exception {
26 
27  public:
28  UtilException(std::string msg = "") : std::exception()
29  {
30  _msg = "\033[93m";
31  _msg += msg;
32  _msg += "\033[00m";
33  }
34 
35  virtual ~UtilException() throw(){};
36  virtual const char* what() const throw() { return _msg.c_str(); }
37 
38  private:
39  std::string _msg;
40  };
41 
42 }
43 #endif
44  // end of doxygen group
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:26
STL namespace.
virtual ~UtilException()
Definition: UtilException.h:35
UtilException(std::string msg="")
Definition: UtilException.h:28
virtual const char * what() const
Definition: UtilException.h:36
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33