lib/kinematics/AnalyticalGuess/include/exception.h
Go to the documentation of this file.
1 //
2 // C++ Interface: exception
3 //
4 // Description:
5 //
6 //
7 // Author: Jonas Haller
8 //
9 // Copyright: Neuronics AG, 2008
10 //
11 //
12 
13 #ifndef _EXCEPTION_H_
14 #define _EXCEPTION_H_
15 
16 #include <string>
17 
18 namespace AnaGuess {
19 
24 
25 class Exception : public std::exception {
26  protected:
27  const std::string mMessage;
28  const int mErrorNumber;
29 
30  public:
31  Exception(const std::string & aMessage, const int aErrorNumber) throw () :
32  std::exception(),
33  mMessage(aMessage), mErrorNumber(aErrorNumber) {
34  }
35 
36  virtual ~Exception() throw () {
37  }
38 
39  std::string message() const throw() {
40  return mMessage;
41  }
42  const char* what() const throw() {
43  return mMessage.c_str();
44  }
45 
46  const int errorNumber() const throw() {
47  return mErrorNumber;
48  }
49 };
50 
54 
55 } // namespace
56 
57 #endif //_EXCEPTION_H_
Exception(const std::string &aMessage, const int aErrorNumber)


kni
Author(s): Martin Günther
autogenerated on Fri Jan 3 2020 04:01:16