mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
Try to log useful information for exceptions thrown by RunWorker
This commit is contained in:
parent
d7833a5977
commit
54a8c7b434
@ -526,6 +526,9 @@ static pid_t StartUnixWorker(const std::vector<std::string>& configs, bool close
|
|||||||
}
|
}
|
||||||
|
|
||||||
_exit(RunWorker(configs, closeConsoleLog, stderrFile));
|
_exit(RunWorker(configs, closeConsoleLog, stderrFile));
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
Log(LogCritical, "cli") << "Exception in main process: " << DiagnosticInformation(ex);
|
||||||
|
_exit(EXIT_FAILURE);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
@ -690,6 +693,9 @@ int DaemonCommand::Run(const po::variables_map& vm, const std::vector<std::strin
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
try {
|
try {
|
||||||
return RunWorker(configs);
|
return RunWorker(configs);
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
Log(LogCritical, "cli") << "Exception in main process: " << DiagnosticInformation(ex);
|
||||||
|
return EXIT_FAILURE;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user