diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-16 07:14:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-16 07:14:53 +0200 |
commit | fbe0716682ad4fd64df670978785db372cbe2ed2 (patch) | |
tree | cc041c77ba1a95c42ae2f2d40298945a59d304bd /bpkg/diagnostics.cxx | |
parent | 3ae0be3ad747b8ff63fa96091f4ea186d1bd9472 (diff) |
Add exception_guard
Diffstat (limited to 'bpkg/diagnostics.cxx')
-rw-r--r-- | bpkg/diagnostics.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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 <iostream> +#include <bpkg/utility> + 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; |