tlx
die() - Simple Invariant Testing

tlx contains a set of macros called die_... for simple invariant testing.

They test some condition and fail with nice output containing both the condition, and file/line information where it occurred.

Furthermore, some additional assert macros are also available. These are only active in Debug mode, if NDEBUG is defined they are compiled out.

tlx die macros can also be modified to throw a DieException instead of calling std::terminate. Either call set_die_with_exception(true) to define TLX_DIE_WITH_EXCEPTION=1 using the preprocessor.