Functions
run_time_functions.hpp File Reference
#include <cstdlib>
#include <ecl/config/macros.hpp>
#include "handlers.hpp"
Include dependency graph for run_time_functions.hpp:
This graph shows which files directly or indirectly include this file:

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. More...
 
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. More...
 
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. More...
 
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. More...
 

Function Documentation

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.

Parameters
location: code location, use the LOC macro.
msg: customised error string.
See also
LOC
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.

Parameters
location: code location, use the LOC macro.
type: predefined error message type tag.
See also
LOC
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).

Parameters
requirement: logic expression to test for truthfulness.
location: code location, use the LOC macro.
msg: customised error string.
See also
LOC
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).

Parameters
requirement: logic expression to test for truthfulness.
location: code location, use the LOC macro.
type: predefined error message tag.
See also
LOC.


xbot_node
Author(s): Roc, wangpeng@droid.ac.cn
autogenerated on Sat Oct 10 2020 03:28:13