BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
RdbException.h
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/rdbModel/rdbModel/RdbException.h,v 1.1.1.1 2005/10/17 06:10:53 maqm Exp $
2#ifndef RDBMODEL_RDBEXCEPTION_H
3#define RDBMODEL_RDBEXCEPTION_H
4#include <exception>
5
6namespace rdbModel {
7
8 class RdbException : std::exception {
9 public:
10 RdbException(const std::string& extraInfo = "", int code=0) :
11 std::exception(),
12 m_name("RdbException"), m_extra(extraInfo), m_code(code) {}
13 virtual ~RdbException() throw() {}
14 virtual std::string getMsg() {
15 std::string msg = m_name + ": " + m_extra;
16 return msg;}
17 virtual int getCode() const { return m_code;}
18 virtual const char* what() {
19 return m_extra.c_str();
20 }
21 protected:
22 std::string m_name;
23 private:
24 std::string m_extra;
25 int m_code;
26 };
27
28}
29#endif
virtual int getCode() const
Definition: RdbException.h:17
virtual const char * what()
Definition: RdbException.h:18
virtual std::string getMsg()
Definition: RdbException.h:14
RdbException(const std::string &extraInfo="", int code=0)
Definition: RdbException.h:10