Skip to content

Commit

Permalink
When exceptions are disabled, only print the error message when defin…
Browse files Browse the repository at this point in the history
…ed(TSL_DEBUG) instead of !defined(NDEBUG)
  • Loading branch information
Tessil committed Apr 30, 2022
1 parent 59a3b7d commit 37e94dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/tsl/robin_growth_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
#define TSL_RH_THROW_OR_TERMINATE(ex, msg) throw ex(msg)
#else
#define TSL_RH_NO_EXCEPTIONS
#ifdef NDEBUG
#define TSL_RH_THROW_OR_TERMINATE(ex, msg) std::terminate()
#else
#ifdef TSL_DEBUG
#include <iostream>
#define TSL_RH_THROW_OR_TERMINATE(ex, msg) \
do { \
std::cerr << msg << std::endl; \
std::terminate(); \
} while (0)
#else
#define TSL_RH_THROW_OR_TERMINATE(ex, msg) std::terminate()
#endif
#endif

Expand Down

0 comments on commit 37e94dc

Please sign in to comment.