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