optional_throw.hpp
A version of emp_assert that throws a runtime error if compiled with -DEMP_OPTIONAL_THROW_ON.
This is useful if you want the option to throw a runtime error outside of debug mode. A common use case is wrapping C++ code in Python, since segfaults kill the entire Python interpreter.
Defines
-
emp_optional_throw(...)
NDEBUG should trigger its EMP equivalent.
Require a specified condition to be true. If it is false, immediately halt execution. Print also extra information on any variables or expressions provided as variadic args. Note: If NDEBUG is defined, emp_assert() will not do anything. Due to macro parsing limitations, extra information will not be printed when compiling with MSVC.