BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/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
RdbException(const std::string &extraInfo="", int code=0)