mirror of
https://github.com/Zygo/bees.git
synced 2025-07-01 16:22:27 +02:00
trace: export exception_check
We need to call this from more than one place in bees. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -8,21 +8,15 @@ thread_local BeesTracer *BeesTracer::tl_next_tracer = nullptr;
|
|||||||
thread_local bool BeesTracer::tl_first = true;
|
thread_local bool BeesTracer::tl_first = true;
|
||||||
thread_local bool BeesTracer::tl_silent = false;
|
thread_local bool BeesTracer::tl_silent = false;
|
||||||
|
|
||||||
|
bool
|
||||||
|
exception_check()
|
||||||
|
{
|
||||||
#if __cplusplus >= 201703
|
#if __cplusplus >= 201703
|
||||||
static
|
|
||||||
bool
|
|
||||||
exception_check()
|
|
||||||
{
|
|
||||||
return uncaught_exceptions();
|
return uncaught_exceptions();
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
static
|
|
||||||
bool
|
|
||||||
exception_check()
|
|
||||||
{
|
|
||||||
return uncaught_exception();
|
return uncaught_exception();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
BeesTracer::~BeesTracer()
|
BeesTracer::~BeesTracer()
|
||||||
{
|
{
|
||||||
|
@ -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_unreadahead(int fd, off_t offset, size_t size);
|
||||||
void bees_throttle(double time_used, const char *context);
|
void bees_throttle(double time_used, const char *context);
|
||||||
string format_time(time_t t);
|
string format_time(time_t t);
|
||||||
|
bool exception_check();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user