From 9852b855db2a65ea6eb5e877411634820214ddf0 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sat, 16 Mar 2024 11:21:23 -0700 Subject: initial setup --- src/bad_thing.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/bad_thing.h (limited to 'src/bad_thing.h') 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 -- cgit v1.2.3