diff options
Diffstat (limited to 'project2/exceptions.h')
-rw-r--r-- | project2/exceptions.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/project2/exceptions.h b/project2/exceptions.h index 23faafc..a9d4952 100644 --- a/project2/exceptions.h +++ b/project2/exceptions.h @@ -12,6 +12,11 @@ class numeric_error : public std::exception { int err; mutable char * buf; }; +#define StaticMessageException(Name, Text) \ +class Name : public std::runtime_error { \ + public: \ + Name() : std::runtime_error(Text) { } \ +} #define SimpleMessageException(Name) \ class Name : public std::runtime_error { \ public: \ |