24 lines
339 B
C++
Executable File
24 lines
339 B
C++
Executable File
#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
|