Line data Source code
1 : #ifndef __IPPLEXCEPTION_H__
2 : #define __IPPLEXCEPTION_H__
3 :
4 : #include <string>
5 :
6 : class IpplException {
7 : public:
8 3 : IpplException(const std::string& meth, const std::string& descr) {
9 3 : descr_ = descr;
10 3 : meth_ = meth;
11 3 : }
12 :
13 0 : virtual const char* what() const throw() { return descr_.c_str(); }
14 :
15 0 : virtual const std::string& where() const { return meth_; }
16 :
17 : private:
18 : std::string descr_;
19 : std::string meth_;
20 : };
21 :
22 : #endif
|