initial version
This commit is contained in:
23
Exception.h
Executable file
23
Exception.h
Executable file
@@ -0,0 +1,23 @@
|
||||
#ifndef EXCEPTION_H
|
||||
#define EXCEPTION_H
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
class Exception : public std::exception {
|
||||
|
||||
private:
|
||||
|
||||
/** the exception message */
|
||||
std::string str;
|
||||
|
||||
public:
|
||||
|
||||
/** ctor */
|
||||
Exception(const std::string& str) : str(str) {;}
|
||||
|
||||
const char* what() const throw() {return str.c_str();}
|
||||
|
||||
};
|
||||
|
||||
#endif // EXCEPTION_H
|
||||
Reference in New Issue
Block a user