mirror of https://github.com/Icinga/icinga2.git
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));
|
||||
} catch (const std::exception& ex) {
|
||||
Log(LogCritical, "cli") << "Exception in main process: " << DiagnosticInformation(ex);
|
||||
_exit(EXIT_FAILURE);
|
||||
} catch (...) {
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -690,6 +693,9 @@ int DaemonCommand::Run(const po::variables_map& vm, const std::vector<std::strin
|
|||
#ifdef _WIN32
|
||||
try {
|
||||
return RunWorker(configs);
|
||||
} catch (const std::exception& ex) {
|
||||
Log(LogCritical, "cli") << "Exception in main process: " << DiagnosticInformation(ex);
|
||||
return EXIT_FAILURE;
|
||||
} catch (...) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue