1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

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 <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2020-09-29 22:09:26 -04:00
parent 05bd65444d
commit 15ab981d9e
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ namespace crucible {
ChatterUnwinder::~ChatterUnwinder()
{
if (uncaught_exception()) {
if (current_exception()) {
m_func();
}
}

View File

@ -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) {