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:
Henrik Triem 2019-06-24 17:34:53 +02:00 committed by GitHub
commit a7e94aab6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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();