StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StUCMException.h
1 /*
2  * @file StUCMException.h
3  * @author Stephen Tramer
4  *
5  * @(#)cpp/api:$Id: StUCMException.h,v 1.2 2010/03/30 20:05:36 fine Exp $
6  *
7  * StUCMException is the generic exception thrown by UCM; it serves
8  * as the base class for the more specific TxDataException and TxModuleException
9  * classes.
10  */
11 
12 #ifndef _ST_UCM_EXCEPTION_H_
13 #define _ST_UCM_EXCEPTION_H_
14 
15 #include <string>
16 
21  public:
25  enum Severity
26  {
27  WARN,
28  ERROR,
29  FATAL
30  };
31 
32  public:
38  StUCMException(const std::string& description, Severity severity = ERROR);
39 
43  virtual ~StUCMException();
44 
48  virtual std::string getDescription() const;
49 
53  virtual Severity getSeverity() const;
54 
55  protected:
63  StUCMException(Severity severity = ERROR);
64 
70  void setDescription(const std::string& description);
71 
72  private:
73  std::string description_;
74  Severity severity_;
75 };
76 
77 #endif
StUCMException(const std::string &description, Severity severity=ERROR)
virtual ~StUCMException()
virtual std::string getDescription() const
virtual Severity getSeverity() const