Functions for error-checking and program termination. More...
Go to the source code of this file.
Functions | |
ecl_errors_PUBLIC void | ecl_run_time_abort (const char *location, const char *msg="Abort procedure called.") |
Puts a customised error string to stderr before aborting the program. | |
ecl_errors_PUBLIC void | ecl_run_time_abort (const char *location, ecl::ErrorFlag type) |
Puts a predefined error string to stderr before aborting the program. | |
ecl_errors_PUBLIC void | ecl_run_time_assert (bool requirement, const char *location, const char *msg) |
Condition test, aborts with a programmable error string if it fails. | |
ecl_errors_PUBLIC void | ecl_run_time_assert (bool requirement, const char *location, ecl::ErrorFlag type) |
Condition test, aborts with a predefined error string if it fails. |
Functions for error-checking and program termination.
Functions for error-checking and program termination.
Definition in file run_time_functions.hpp.
ecl_errors_PUBLIC void ecl_run_time_abort | ( | const char * | location, |
const char * | msg = "Abort procedure called." |
||
) |
Puts a customised error string to stderr before aborting the program.
Writes an error message to stderror before promptly aborting. Note that this one is not affected by the presence/absence of the macro NDEBUG.
location | : code location, use the LOC macro. |
msg | : customised error string. |
Definition at line 56 of file run_time_functions.cpp.
ecl_errors_PUBLIC void ecl_run_time_abort | ( | const char * | location, |
ecl::ErrorFlag | type | ||
) |
Puts a predefined error string to stderr before aborting the program.
Writes an error message to stderror before promptly aborting with a pre-defined error message. Note that this one is not affected by the presence/absence of the macro NDEBUG.
location | : code location, use the LOC macro. |
type | : predefined error message type tag. |
Definition at line 66 of file run_time_functions.cpp.
ecl_errors_PUBLIC void ecl_run_time_assert | ( | bool | requirement, |
const char * | location, | ||
const char * | msg | ||
) |
Condition test, aborts with a programmable error string if it fails.
Tests an assertion and if it fails, it writes a message (file, line# and warning) to stderror before aborting the program (and if on *nix, core dumping). This allows a customised user string for the error message.
This function is only available if NDEBUG is not set (i.e. debug mode).
requirement | : logic expression to test for truthfulness. |
location | : code location, use the LOC macro. |
msg | : customised error string. |
Definition at line 23 of file run_time_functions.cpp.
ecl_errors_PUBLIC void ecl_run_time_assert | ( | bool | requirement, |
const char * | location, | ||
ecl::ErrorFlag | type | ||
) |
Condition test, aborts with a predefined error string if it fails.
Tests an assertion and if it fails, it writes a message (file, line# and warning) to stderror before aborting the program (and if on *nix, core dumping). This uses a pre-defined error flag to generate the error message.
This function is only available if NDEBUG is not set (i.e. debug mode).
requirement | : logic expression to test for truthfulness. |
location | : code location, use the LOC macro. |
type | : predefined error message tag. |
Definition at line 36 of file run_time_functions.cpp.