diff options
Diffstat (limited to 'src/bad_thing.h')
-rw-r--r-- | src/bad_thing.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bad_thing.h b/src/bad_thing.h new file mode 100644 index 0000000..ec13f1c --- /dev/null +++ b/src/bad_thing.h @@ -0,0 +1,12 @@ +#ifndef BAD_THING__H +#define BAD_THING__H +class bad_thing: public std::exception{ + const char* msg; + virtual const char* what() const throw() { + return msg; + } +public: + bad_thing(const char* _msg) + : msg(_msg) {} +}; +#endif |