From: Zygo Blaxell Date: Tue, 11 Feb 2025 05:28:05 +0000 (-0500) Subject: trace: export `exception_check` X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09531605847b3e5de03f89847c71220f2ad4507c;p=bees trace: export `exception_check` We need to call this from more than one place in bees. Signed-off-by: Zygo Blaxell --- diff --git a/src/bees-trace.cc b/src/bees-trace.cc index bc756786..fdb1925c 100644 --- a/src/bees-trace.cc +++ b/src/bees-trace.cc @@ -8,21 +8,15 @@ thread_local BeesTracer *BeesTracer::tl_next_tracer = nullptr; thread_local bool BeesTracer::tl_first = true; thread_local bool BeesTracer::tl_silent = false; -#if __cplusplus >= 201703 -static bool exception_check() { +#if __cplusplus >= 201703 return uncaught_exceptions(); -} #else -static -bool -exception_check() -{ return uncaught_exception(); -} #endif +} BeesTracer::~BeesTracer() { diff --git a/src/bees.h b/src/bees.h index 2cbe4666..314cbe8e 100644 --- a/src/bees.h +++ b/src/bees.h @@ -901,5 +901,6 @@ void bees_readahead_pair(int fd, off_t offset, size_t size, int fd2, off_t offse void bees_unreadahead(int fd, off_t offset, size_t size); void bees_throttle(double time_used, const char *context); string format_time(time_t t); +bool exception_check(); #endif