]> git.hungrycats.org Git - bees/commitdiff
trace: export `exception_check`
authorZygo Blaxell <bees@furryterror.org>
Tue, 11 Feb 2025 05:28:05 +0000 (00:28 -0500)
committerZygo Blaxell <bees@furryterror.org>
Thu, 19 Jun 2025 01:17:48 +0000 (21:17 -0400)
We need to call this from more than one place in bees.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-trace.cc
src/bees.h

index bc756786a34a28557c4796e3fd4bb9055c796c31..fdb1925c1e3e699632f8aa370acb96d1abcfd339 100644 (file)
@@ -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()
 {
index 2cbe466696a90de8a12c8ef0097f9e02959dcdd1..314cbe8e99cd154e59b5ff455ee86fa4b1e47bc4 100644 (file)
@@ -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