| 42 |  |  | 
| 43 |  | #ifndef UTILS_OPENMDEXCEPTION_HPP | 
| 44 |  | #define UTILS_OPENMDEXCEPTION_HPP | 
| 45 | + |  | 
| 46 | + | #include <exception> | 
| 47 | + |  | 
| 48 |  | namespace OpenMD { | 
| 49 |  |  | 
| 50 | < | class OpenMDException { | 
| 50 | > | class OpenMDException : public std::exception { | 
| 51 |  | public: | 
| 52 |  | OpenMDException() : msg_("") {} | 
| 53 | < | OpenMDException(const std::string &msg) : msg_(msg) {} | 
| 54 | < | const std::string getMessage() {return msg_;} | 
| 53 | > | explicit OpenMDException(const std::string &msg) : msg_(msg) {}; | 
| 54 | > |  | 
| 55 | > | ~OpenMDException() throw() {} | 
| 56 | > |  | 
| 57 | > | const char * what () const throw () | 
| 58 | > | { | 
| 59 | > | return msg_.c_str(); | 
| 60 | > | } | 
| 61 |  | private: | 
| 62 |  | std::string msg_; | 
| 63 |  |  |