summaryrefslogtreecommitdiff
path: root/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'error.h')
-rw-r--r--error.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/error.h b/error.h
index 93116054..44bca430 100644
--- a/error.h
+++ b/error.h
@@ -36,6 +36,14 @@ public:
}
};
+#define DEFINE_EXCEPTION(name) \
+ class name : public exception { \
+ public: \
+ name(const string& _reason, \
+ const context& immediate_ctxt) throw() \
+ : exception(_reason, immediate_ctxt) {} \
+ };
+
#if 0
class error_context