Functions
run_time_functions.hpp File Reference

Functions for error-checking and program termination. More...

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

Detailed Description

Functions for error-checking and program termination.

Functions for error-checking and program termination.

Date:
April, 2009

Definition in file run_time_functions.hpp.


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

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.

Parameters:
location: code location, use the LOC macro.
type: predefined error message type tag.
See also:
LOC

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

Parameters:
requirement: logic expression to test for truthfulness.
location: code location, use the LOC macro.
msg: customised error string.
See also:
LOC

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

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

Definition at line 36 of file run_time_functions.cpp.



ecl_errors
Author(s): Daniel Stonier
autogenerated on Sun Oct 5 2014 23:35:26