All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WebError.h
Go to the documentation of this file.
1 /**
2  * \file WebError.h
3  *
4  * \ingroup WebDBI
5  *
6  * \brief Collection of exception classes for WebDBI
7  *
8  * @author kterao
9  */
10 
11 /** \addtogroup WebDBI
12 
13  @{*/
14 #ifndef WEBDB_WEBERROR_H
15 #define WEBDB_WEBERROR_H
16 
17 #include <iostream>
18 #include <exception>
19 
20 namespace lariov {
21 
22  /**
23  \class WebError
24  */
25  class WebError : public std::exception{
26 
27  public:
28 
29  WebError(std::string msg="") : std::exception()
30  {
31  _msg = "\033[93m";
32  _msg += msg;
33  _msg += "\033[00m";
34  }
35 
36  virtual ~WebError() throw(){};
37  virtual const char* what() const throw()
38  { return _msg.c_str(); }
39 
40  private:
41  std::string _msg;
42  };
43 
44 }
45 
46 #endif
47 /** @} */ // end of doxygen group
48 
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
virtual ~WebError()
Definition: WebError.h:36
WebError(std::string msg="")
Definition: WebError.h:29
std::string _msg
Definition: WebError.h:41
virtual const char * what() const
Definition: WebError.h:37