From 3d363854e29e45580f4abebca8b05125626c34da Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 19 Jun 2019 14:26:34 +0200 Subject: [PATCH] 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. --- lib/base/workqueue.cpp | 4 ++-- lib/base/workqueue.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/base/workqueue.cpp b/lib/base/workqueue.cpp index 99bb50927..cacd17b76 100644 --- a/lib/base/workqueue.cpp +++ b/lib/base/workqueue.cpp @@ -169,13 +169,13 @@ std::vector WorkQueue::GetExceptions() const return m_Exceptions; } -void WorkQueue::ReportExceptions(const String& facility) const +void WorkQueue::ReportExceptions(const String& facility, bool verbose) const { std::vector exceptions = GetExceptions(); for (const auto& eptr : exceptions) { Log(LogCritical, facility) - << DiagnosticInformation(eptr); + << DiagnosticInformation(eptr, verbose); } Log(LogCritical, facility) diff --git a/lib/base/workqueue.hpp b/lib/base/workqueue.hpp index 824d2e824..bc84d9176 100644 --- a/lib/base/workqueue.hpp +++ b/lib/base/workqueue.hpp @@ -103,7 +103,7 @@ public: bool HasExceptions() const; std::vector GetExceptions() const; - void ReportExceptions(const String& facility) const; + void ReportExceptions(const String& facility, bool verbose = false) const; protected: void IncreaseTaskCount();