aboutsummaryrefslogtreecommitdiffstats
path: root/host/include/uhd/utils/safe_main.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/include/uhd/utils/safe_main.hpp')
-rw-r--r--host/include/uhd/utils/safe_main.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/host/include/uhd/utils/safe_main.hpp b/host/include/uhd/utils/safe_main.hpp
index b682aa540..a4e4e06e8 100644
--- a/host/include/uhd/utils/safe_main.hpp
+++ b/host/include/uhd/utils/safe_main.hpp
@@ -19,6 +19,7 @@
#define INCLUDED_UHD_UTILS_SAFE_MAIN_HPP
#include <uhd/config.hpp>
+#include <boost/exception/diagnostic_information.hpp>
#include <iostream>
#include <stdexcept>
@@ -33,6 +34,8 @@
int main(int argc, char *argv[]){ \
try { \
return _main(argc, argv); \
+ } catch(const boost::exception &e){ \
+ std::cerr << "Error: " << boost::diagnostic_information(e) << std::endl; \
} catch(const std::exception &e) { \
std::cerr << "Error: " << e.what() << std::endl; \
} catch(...) { \