summaryrefslogtreecommitdiffstats
path: root/host/lib/exception.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/exception.cpp')
-rw-r--r--host/lib/exception.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/exception.cpp b/host/lib/exception.cpp
index ecb1fe768..ea056bd3b 100644
--- a/host/lib/exception.cpp
+++ b/host/lib/exception.cpp
@@ -27,7 +27,9 @@ exception::exception(const std::string &what):
#define make_exception_impl(name, class, base) \
class::class(const std::string &what): \
base(str(boost::format("%s: %s") % name % what)){} \
- unsigned class::code(void) const{return boost::hash<std::string>()(#class) & 0xfff;}
+ unsigned class::code(void) const{return boost::hash<std::string>()(#class) & 0xfff;} \
+ class *class::dynamic_clone(void) const{return new class(*this);} \
+ void class::dynamic_throw(void) const{throw *this;}
make_exception_impl("AssertionError", assertion_error, exception)
make_exception_impl("LookupError", lookup_error, exception)