mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
9fe52d0dc1
commit
0f2598b43b
@ -264,25 +264,15 @@ int Main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("library")) {
|
if (vm.count("library")) {
|
||||||
BOOST_FOREACH(const String& libraryName, vm["library"].as<std::vector<std::string> >())
|
BOOST_FOREACH(const String& libraryName, vm["library"].as<std::vector<std::string> >()) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
(void)Utility::LoadExtensionLibrary(libraryName);
|
(void) Utility::LoadExtensionLibrary(libraryName);
|
||||||
}
|
} catch (const std::exception& ex) {
|
||||||
#ifdef _WIN32
|
Log(LogCritical, "icinga-app")
|
||||||
catch (win32_error &ex) {
|
<< "Could not load library \"" << libraryName << "\": " << DiagnosticInformation(ex);
|
||||||
if (int const * err = boost::get_error_info<errinfo_win32_error>(ex)) {
|
|
||||||
Log(LogCritical, "icinga-app", "Could not load library \"" + libraryName + "\"");
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else /*_WIN32*/
|
|
||||||
catch (std::runtime_error &ex) {
|
|
||||||
Log(LogCritical, "icinga-app", "Could not load library \"" + libraryName + "\"");
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
#endif /*_WIN32*/
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!command || vm.count("help") || vm.count("version")) {
|
if (!command || vm.count("help") || vm.count("version")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user