diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-25 20:22:12 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-25 20:22:12 -0700 |
commit | b8d0dc0918c90c03b5e69593c8f79b5457aa5d7a (patch) | |
tree | a5003aa4e1e44b619b41e0b819700b09fc65cee5 /host/lib/exception.cpp | |
parent | 58679377fba07be56548874ed117a76eae79e846 (diff) | |
parent | 25d6e39c6af61acde0616cf50178d40741c4eace (diff) | |
download | uhd-b8d0dc0918c90c03b5e69593c8f79b5457aa5d7a.tar.gz uhd-b8d0dc0918c90c03b5e69593c8f79b5457aa5d7a.tar.bz2 uhd-b8d0dc0918c90c03b5e69593c8f79b5457aa5d7a.zip |
Merge branch 'master' into next
Diffstat (limited to 'host/lib/exception.cpp')
-rw-r--r-- | host/lib/exception.cpp | 4 |
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) |