From 6b9a3a534071ef84c121c406559f8fc7ad546104 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 11 Dec 2015 09:42:06 -0500 Subject: 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 --- src/lib/utils/dyn_load/dyn_load.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/utils/dyn_load') 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; -- cgit v1.2.3