aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils/load_modules.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-24 16:35:29 -0800
committerJosh Blum <josh@joshknows.com>2011-02-24 16:35:29 -0800
commit4357f5d3c043245b5c086b20742795624af9f432 (patch)
tree7a3cfc9f5b3ffc285ecd611655d741355dcb39b8 /host/lib/utils/load_modules.cpp
parent16f08844d7b6ccbdcfdf17963b88cadb7525ddc6 (diff)
downloaduhd-4357f5d3c043245b5c086b20742795624af9f432.tar.gz
uhd-4357f5d3c043245b5c086b20742795624af9f432.tar.bz2
uhd-4357f5d3c043245b5c086b20742795624af9f432.zip
uhd: replaced instanced of std::exception with the uhd exceptions
Diffstat (limited to 'host/lib/utils/load_modules.cpp')
-rw-r--r--host/lib/utils/load_modules.cpp10
1 files changed, 5 insertions, 5 deletions
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 <uhd/utils/static.hpp>
+#include <uhd/exception.hpp>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
#include <boost/filesystem.hpp>
#include <iostream>
-#include <stdexcept>
#include <string>
#include <vector>
@@ -33,7 +33,7 @@ namespace fs = boost::filesystem;
#include <dlfcn.h>
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 <windows.h>
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
));
}