Disable stack traces for WQ exceptions (used in config compiler)

The ConfigItem class collects exceptions and reports them.
In contrast to our other DiagnosticInformation() calls,
verbosity is enabled any time.

This patch allows to re-enable the verbose output including
the stack traces, but disables this by default.
This commit is contained in:
Michael Friedrich 2019-06-19 14:26:34 +02:00
parent ad3a78c3a2
commit 3d363854e2
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();