aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/exception.cpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-08-10 23:14:20 -0700
committerAshish Chaudhari <ashish@ettus.com>2015-08-10 23:14:20 -0700
commitb5c81677078f56b3e671ebeaca1e3b803c2f4ef9 (patch)
treea1b17b4be203331de7e146e94051f26be5a20102 /host/lib/exception.cpp
parent16e149fe6fcc1bc18adea3eeeefad2c7ee93b2e0 (diff)
parent28327c8e8a810b19da126116d0dc4c26b643baed (diff)
downloaduhd-b5c81677078f56b3e671ebeaca1e3b803c2f4ef9.tar.gz
uhd-b5c81677078f56b3e671ebeaca1e3b803c2f4ef9.tar.bz2
uhd-b5c81677078f56b3e671ebeaca1e3b803c2f4ef9.zip
Merge branch 'master' into ashish/register_api
Diffstat (limited to 'host/lib/exception.cpp')
-rw-r--r--host/lib/exception.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/host/lib/exception.cpp b/host/lib/exception.cpp
index ea056bd3b..a9e36fd15 100644
--- a/host/lib/exception.cpp
+++ b/host/lib/exception.cpp
@@ -43,3 +43,8 @@ make_exception_impl("EnvironmentError", environment_error, exception)
make_exception_impl("IOError", io_error, environment_error)
make_exception_impl("OSError", os_error, environment_error)
make_exception_impl("SystemError", system_error, exception)
+
+usb_error::usb_error(int code, const std::string &what):
+ runtime_error(str(boost::format("%s %d: %s") % "USBError" % code % what)), _code(code) {}
+usb_error *usb_error::dynamic_clone(void) const{return new usb_error(*this);} \
+void usb_error::dynamic_throw(void) const{throw *this;}