Rosetta
|
Programmatic backtrace whenever you want it. More...
#include <cassert>
#include <string>
#include <assert.h>
Macros | |
#define | MY__has_include(x) 1 |
#define | debug_assert(condition) assert( ( condition ) || handle_assert_failure( #condition, __FILE__, __LINE__ ) ) |
Functions | |
void | set_throw_on_next_assertion_failure () |
Function for unit testing only – if an assertion failure is hit, throw an exception instead of exiting. Don't let me catch you calling this function from anywhere besides a unit test. Punishment will be swift. More... | |
bool | maybe_throw_on_next_assertion_failure (char const *condition) |
Throw an exception if set_throw_on_next_assertion_failure was called since the last time this function was called. More... | |
std::string | backtrace_string (int skip=0) |
bool | print_backtrace (char const *) |
bool | handle_assert_failure (char const *condition, std::string const &file, int const line) |
Programmatic backtrace whenever you want it.
#define debug_assert | ( | condition | ) | assert( ( condition ) || handle_assert_failure( #condition, __FILE__, __LINE__ ) ) |
#define MY__has_include | ( | x | ) | 1 |
|
inline |
Referenced by utility::save_crash_report().
bool handle_assert_failure | ( | char const * | condition, |
std::string const & | file, | ||
int const | line | ||
) |
bool maybe_throw_on_next_assertion_failure | ( | char const * | condition | ) |
Throw an exception if set_throw_on_next_assertion_failure was called since the last time this function was called.
References CREATE_EXCEPTION, and throw_the_next_time_an_assertion_failure_is_hit().
Referenced by utility::exit_handler(), and handle_assert_failure().
|
inline |
void set_throw_on_next_assertion_failure | ( | ) |
Function for unit testing only – if an assertion failure is hit, throw an exception instead of exiting. Don't let me catch you calling this function from anywhere besides a unit test. Punishment will be swift.
References throw_the_next_time_an_assertion_failure_is_hit().