diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-09-07 17:14:42 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-09-07 17:14:42 +0200 |
commit | e09d2127fc35d88bc94174514a2c79ad4400b9a7 (patch) | |
tree | 7efca2dc5db692a9abe64fbe84d11b2ebf589808 /include | |
parent | 26310b6ff3b4cb92cc9bb462536a9c5235fc3389 (diff) | |
download | crawler-e09d2127fc35d88bc94174514a2c79ad4400b9a7.tar.gz crawler-e09d2127fc35d88bc94174514a2c79ad4400b9a7.tar.bz2 |
fixed error handling in module loader
Diffstat (limited to 'include')
-rwxr-xr-x | include/module/ModuleLoader.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/module/ModuleLoader.hpp b/include/module/ModuleLoader.hpp index a5416bb..d3b7d00 100755 --- a/include/module/ModuleLoader.hpp +++ b/include/module/ModuleLoader.hpp @@ -55,13 +55,13 @@ class BaseModuleLoader { m.handle = LoadLibrary( it->c_str( ) ); #endif if( !m.handle ) { + std::ostringstream ss; #ifndef _WIN32 - throw std::runtime_error( dlerror( ) ); + ss << "Module '" << *it << "' loading error: " << dlerror( ); #else - std::ostringstream ss; ss << "Module '" << *it << "' loading error: " << getLastError( ); - throw std::runtime_error( ss.str( ) ); #endif + throw std::runtime_error( ss.str( ) ); } std::string registryName = "registry_" + demangle( typeid( Interface ) ); |