diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-01-10 14:45:30 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-01-12 13:18:03 -0800 |
commit | c48c57073d618df5a023b5daec372aec5770b471 (patch) | |
tree | c736e31a4ededb430141703055f1bfa53f21b65f /host/include | |
parent | ebfd551c355cd28f720b6b77a9d0470353b2e21c (diff) | |
download | uhd-c48c57073d618df5a023b5daec372aec5770b471.tar.gz uhd-c48c57073d618df5a023b5daec372aec5770b471.tar.bz2 uhd-c48c57073d618df5a023b5daec372aec5770b471.zip |
uhd: Add narrow_cast and narrow
Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/exception.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/host/include/uhd/exception.hpp b/host/include/uhd/exception.hpp index 5ae5d790e..a8cbb8134 100644 --- a/host/include/uhd/exception.hpp +++ b/host/include/uhd/exception.hpp @@ -80,6 +80,13 @@ namespace uhd{ virtual void dynamic_throw(void) const; }; + struct UHD_API narrowing_error : value_error{ + narrowing_error(const std::string &what); + virtual unsigned code(void) const; + virtual narrowing_error *dynamic_clone(void) const; + virtual void dynamic_throw(void) const; + }; + struct UHD_API runtime_error : exception{ runtime_error(const std::string &what); virtual unsigned code(void) const; |