From 4357f5d3c043245b5c086b20742795624af9f432 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 24 Feb 2011 16:35:29 -0800 Subject: uhd: replaced instanced of std::exception with the uhd exceptions --- host/lib/utils/load_modules.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'host/lib/utils/load_modules.cpp') diff --git a/host/lib/utils/load_modules.cpp b/host/lib/utils/load_modules.cpp index fa9b22438..ad39960bb 100644 --- a/host/lib/utils/load_modules.cpp +++ b/host/lib/utils/load_modules.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -16,11 +16,11 @@ // #include +#include #include #include #include #include -#include #include #include @@ -33,7 +33,7 @@ namespace fs = boost::filesystem; #include static void load_module(const std::string &file_name){ if (dlopen(file_name.c_str(), RTLD_LAZY) == NULL){ - throw std::runtime_error(str( + throw uhd::os_error(str( boost::format("dlopen failed to load \"%s\"") % file_name )); } @@ -45,7 +45,7 @@ static void load_module(const std::string &file_name){ #include static void load_module(const std::string &file_name){ if (LoadLibrary(file_name.c_str()) == NULL){ - throw std::runtime_error(str( + throw uhd::os_error(str( boost::format("LoadLibrary failed to load \"%s\"") % file_name )); } @@ -55,7 +55,7 @@ static void load_module(const std::string &file_name){ #ifdef HAVE_LOAD_MODULES_DUMMY static void load_module(const std::string &file_name){ - throw std::runtime_error(str( + throw uhd::not_implemented_error(str( boost::format("Module loading not supported: Cannot load \"%s\"") % file_name )); } -- cgit v1.2.3