mirror of https://github.com/Icinga/icinga2.git
Merge pull request #7251 from Icinga/bugfix/wq-silence-exceptions
Disable stack traces for WQ exceptions (used in config compiler)
This commit is contained in:
commit
a7e94aab6d
|
@ -169,13 +169,13 @@ std::vector<boost::exception_ptr> WorkQueue::GetExceptions() const
|
||||||
return m_Exceptions;
|
return m_Exceptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorkQueue::ReportExceptions(const String& facility) const
|
void WorkQueue::ReportExceptions(const String& facility, bool verbose) const
|
||||||
{
|
{
|
||||||
std::vector<boost::exception_ptr> exceptions = GetExceptions();
|
std::vector<boost::exception_ptr> exceptions = GetExceptions();
|
||||||
|
|
||||||
for (const auto& eptr : exceptions) {
|
for (const auto& eptr : exceptions) {
|
||||||
Log(LogCritical, facility)
|
Log(LogCritical, facility)
|
||||||
<< DiagnosticInformation(eptr);
|
<< DiagnosticInformation(eptr, verbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(LogCritical, facility)
|
Log(LogCritical, facility)
|
||||||
|
|
|
@ -103,7 +103,7 @@ public:
|
||||||
|
|
||||||
bool HasExceptions() const;
|
bool HasExceptions() const;
|
||||||
std::vector<boost::exception_ptr> GetExceptions() const;
|
std::vector<boost::exception_ptr> GetExceptions() const;
|
||||||
void ReportExceptions(const String& facility) const;
|
void ReportExceptions(const String& facility, bool verbose = false) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void IncreaseTaskCount();
|
void IncreaseTaskCount();
|
||||||
|
|
Loading…
Reference in New Issue