Functions
run_time_functions.cpp File Reference

Implementation for the error functions. More...

#include <cstdio>
#include "../../include/ecl/errors/run_time_functions.hpp"
#include "../../include/ecl/errors/handlers.hpp"
Include dependency graph for run_time_functions.cpp:

Go to the source code of this file.

Functions

void ecl_run_time_abort (const char *location, const char *msg)
 Puts a customised error string to stderr before aborting the program. More...
 
void ecl_run_time_abort (const char *location, ecl::ErrorFlag type)
 Puts a predefined error string to stderr before aborting the program. More...
 
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...
 
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...
 

Detailed Description

Implementation for the error functions.

Date
April, 2009

Definition in file run_time_functions.cpp.

Function Documentation

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.

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.

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.

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 Fri Jun 7 2019 21:52:44