aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/dyn_load
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-12-11 09:42:06 -0500
committerJack Lloyd <[email protected]>2015-12-11 09:42:06 -0500
commit6b9a3a534071ef84c121c406559f8fc7ad546104 (patch)
treec11480ad1f07e443ba4e992fefcd618b532c2e93 /src/lib/utils/dyn_load
parent79a51627ee11f4d7f55d589751b30463d1f02a76 (diff)
Reroot the exception hierarchy into a toplevel Exception class
As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43
Diffstat (limited to 'src/lib/utils/dyn_load')
-rw-r--r--src/lib/utils/dyn_load/dyn_load.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/dyn_load/dyn_load.cpp b/src/lib/utils/dyn_load/dyn_load.cpp
index 723d2502e..9b99331d1 100644
--- a/src/lib/utils/dyn_load/dyn_load.cpp
+++ b/src/lib/utils/dyn_load/dyn_load.cpp
@@ -22,7 +22,7 @@ namespace {
void raise_runtime_loader_exception(const std::string& lib_name,
const char* msg)
{
- throw std::runtime_error("Failed to load " + lib_name + ": " +
+ throw Exception("Failed to load " + lib_name + ": " +
(msg ? msg : "Unknown error"));
}
@@ -70,7 +70,7 @@ void* Dynamically_Loaded_Library::resolve_symbol(const std::string& symbol)
#endif
if(!addr)
- throw std::runtime_error("Failed to resolve symbol " + symbol +
+ throw Exception("Failed to resolve symbol " + symbol +
" in " + lib_name);
return addr;