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:
parent
05bd65444d
commit
15ab981d9e
@ -146,7 +146,7 @@ namespace crucible {
|
||||
|
||||
ChatterUnwinder::~ChatterUnwinder()
|
||||
{
|
||||
if (uncaught_exception()) {
|
||||
if (current_exception()) {
|
||||
m_func();
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user