From 8c50c6f91f3a9833ace51c5abcd82000ebcff069 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 30 Aug 2016 20:12:35 +0200 Subject: [PATCH] Add context traces to most exceptions fixes #9182 --- lib/base/exception.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/base/exception.cpp b/lib/base/exception.cpp index 2679d031e..3f3ec9e9e 100644 --- a/lib/base/exception.cpp +++ b/lib/base/exception.cpp @@ -243,7 +243,11 @@ String icinga::DiagnosticInformation(const std::exception& ex, bool verbose, Sta } } - if (boost::get_error_info(ex) == NULL) { + const ContextTrace *ct = boost::get_error_info(ex); + + if (ct) { + result << *ct; + } else { result << std::endl; if (!context) -- 2.40.0