From 15ab981d9e436795c03a65bbe536546b05dea243 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Tue, 29 Sep 2020 22:09:26 -0400 Subject: [PATCH] bees: replace uncaught_exception(), deprecated in C++17 uncaught_exception() had only the one valid use case, and it can be reimplemented by literally calling current_exception() instead. current_exception() has several valid use cases, so it is not likely to be deprecated any time soon. Signed-off-by: Zygo Blaxell --- lib/chatter.cc | 2 +- src/bees.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chatter.cc b/lib/chatter.cc index e5a24f9..9f998e9 100644 --- a/lib/chatter.cc +++ b/lib/chatter.cc @@ -146,7 +146,7 @@ namespace crucible { ChatterUnwinder::~ChatterUnwinder() { - if (uncaught_exception()) { + if (current_exception()) { m_func(); } } diff --git a/src/bees.cc b/src/bees.cc index 5ccfe4d..bdabec1 100644 --- a/src/bees.cc +++ b/src/bees.cc @@ -82,7 +82,7 @@ thread_local bool BeesTracer::tl_silent = false; BeesTracer::~BeesTracer() { - if (!tl_silent && uncaught_exception()) { + if (!tl_silent && current_exception()) { try { m_func(); } catch (exception &e) {