From fbe0716682ad4fd64df670978785db372cbe2ed2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Sep 2015 07:14:53 +0200 Subject: Add exception_guard --- bpkg/diagnostics.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bpkg/diagnostics.cxx') diff --git a/bpkg/diagnostics.cxx b/bpkg/diagnostics.cxx index 39ad1d2..697bd28 100644 --- a/bpkg/diagnostics.cxx +++ b/bpkg/diagnostics.cxx @@ -6,6 +6,8 @@ #include +#include + using namespace std; namespace bpkg @@ -62,7 +64,7 @@ namespace bpkg // this ugly special check which we will be able to get rid of // once C++17 uncaught_exceptions() becomes available. // - if (!empty_ && (!uncaught_exception () /*|| exception_unwinding_dtor*/)) + if (!empty_ && (!uncaught_exception () || exception_unwinding_dtor)) { *diag_stream << os_.str () << endl; -- cgit v1.1