...
Code Block | ||
---|---|---|
| ||
static void my_assertion_proc(const char* message) { printf("It's OK. I caught the assertion: %s\n", message); // Do something else e.g. throw MyProj::FatalException(message); } int main(int argc, char **argv) { codes_set_codes_assertion_failed_proc(&my_assertion_proc); // Do lots of experimental stuff knowing all// All asserts will be caught ... // Now restore default behaviour codes_set_codes_assertion_failed_proc(NULL); return 0; } |
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...