OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
IpplException.h
Go to the documentation of this file.
1 #ifndef __IPPLEXCEPTION_H__
2 #define __IPPLEXCEPTION_H__
3 
4 #include <string>
5 
6 class IpplException {
7 
8 public:
9 
10  IpplException(const std::string &meth, const std::string &descr) {
11  descr_ = descr;
12  meth_ = meth;
13  }
14 
15  virtual const char* what() const throw() {
16  return descr_.c_str();
17  }
18 
19  virtual const std::string& where() const {
20  return meth_;
21  }
22 
23 private:
24 
25  std::string descr_;
26  std::string meth_;
27 
28 };
29 
30 #endif
IpplException(const std::string &meth, const std::string &descr)
Definition: IpplException.h:10
virtual const std::string & where() const
Definition: IpplException.h:19
std::string meth_
Definition: IpplException.h:26
virtual const char * what() const
Definition: IpplException.h:15
std::string descr_
Definition: IpplException.h:25