From fb6a4fc6ac4567b4ec6b3eb9ecea670e5d5736b0 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 7 Apr 2018 11:08:07 -0700 Subject: [PATCH] ircd::ctx: Bypass the exception_handler assertion if on bare metal. --- ircd/ctx.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ircd/ctx.cc b/ircd/ctx.cc index 300fa2e74..4d2b76507 100644 --- a/ircd/ctx.cc +++ b/ircd/ctx.cc @@ -499,7 +499,11 @@ noexcept assert(bool(*this)); //assert(!std::uncaught_exceptions()); __cxa_end_catch(); - assert(!std::current_exception()); + + // We don't yet support more levels of exceptions; after ending this + // catch we can't still be in another one. This doesn't apply if we're + // not on any ctx currently. + assert(!current || !std::current_exception()); } //