0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd: Fix undefined RB_DEBUG for numerical RB_DEBUG_LEVEL.

This commit is contained in:
Jason Volk 2018-01-26 21:49:41 -08:00
parent 52ee74fe55
commit 4818d7b651
2 changed files with 8 additions and 8 deletions

View file

@ -37,9 +37,9 @@ namespace ircd
[[noreturn]] void terminate() noexcept;
// Terminates in debug mode; throws in release mode; always logs critical.
[[noreturn]] void assertion(const std::exception &) noexcept(RB_DEBUG);
[[noreturn]] void assertion(std::exception_ptr) noexcept(RB_DEBUG);
[[noreturn]] void assertion() noexcept(RB_DEBUG);
[[noreturn]] void assertion(const std::exception &) noexcept(RB_DEBUG_LEVEL);
[[noreturn]] void assertion(std::exception_ptr) noexcept(RB_DEBUG_LEVEL);
[[noreturn]] void assertion() noexcept(RB_DEBUG_LEVEL);
// util
std::exception_ptr make_system_error(const int &code = errno);
@ -169,14 +169,14 @@ struct name \
:parent \
{ \
template<class... args> \
name(const char *const &fmt = " ", args&&... ap) noexcept(RB_DEBUG) \
name(const char *const &fmt = " ", args&&... ap) noexcept(RB_DEBUG_LEVEL) \
:parent{generate_skip} \
{ \
generate(#name, fmt, va_rtti{std::forward<args>(ap)...}); \
ircd::assertion(*this); \
} \
\
name(generate_skip_t) noexcept(RB_DEBUG) \
name(generate_skip_t) noexcept(RB_DEBUG_LEVEL) \
:parent{generate_skip} \
{ \
} \

View file

@ -75,7 +75,7 @@ noexcept
void
ircd::assertion()
noexcept(RB_DEBUG)
noexcept(RB_DEBUG_LEVEL)
{
if(std::uncaught_exceptions())
{
@ -89,7 +89,7 @@ noexcept(RB_DEBUG)
void
ircd::assertion(std::exception_ptr eptr)
noexcept(RB_DEBUG) try
noexcept(RB_DEBUG_LEVEL) try
{
std::rethrow_exception(eptr);
}
@ -100,7 +100,7 @@ catch(const std::exception &e)
void
ircd::assertion(const std::exception &e)
noexcept(RB_DEBUG)
noexcept(RB_DEBUG_LEVEL)
{
#ifdef RB_DEBUG
terminate(e);