78 const int max_stack=64;
79 void *stackPtrs[max_stack];
81 int levels=backtrace(stackPtrs,max_stack);
82 char **symbols=backtrace_symbols(stackPtrs, levels);
85 std::printf(
"\nStack Backtrace:\n");
86 for (
int i=nSkip;
i<levels;
i++) {
87 std::printf(
" [%d] %s\n",
i-nSkip, symbols[
i]);
103 std::cerr <<
"Rocface error: " << what <<
" violation!" << std::endl
104 <<
"Expr: " << expr << std::endl
105 <<
"File: " << file << std::endl
106 <<
"Line: " << line << std::endl;
108 std::cerr <<
"Explanation:" << msg << std::endl;
122 std::cerr <<
"Rocface warning: check violation!" << std::endl
123 <<
"Expr: " << expr << std::endl
124 <<
"File: " << file << std::endl
125 <<
"Line: " << line << std::endl;
127 std::cerr <<
"Explanation:" << msg << std::endl;
147 (*_error_handler)(
"assertion", expr, file, line, msg);
167 (*_error_handler)(
"precondition", expr, file, line, msg);
187 (*_error_handler)(
"postcondition", expr, file, line, msg);
210 (*_warning_handler)(
"warning", expr, file, line, msg);
void warning_fail(const char *, const char *, int, const char *)
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
Failure_function set_error_handler(Failure_function handler)
Sets the handler for assertion-failures.
Failure_function set_warning_handler(Failure_function handler)
Failure_behaviour set_error_behaviour(Failure_behaviour eb)
Controls the behavior when an assertion fails.
void postcondition_fail(const char *, const char *, int, const char *)
void(* Failure_function)(const char *, const char *, const char *, int, const char *)
Function type for error handlers.
void precondition_fail(const char *, const char *, int, const char *)
Failure_behaviour set_warning_behaviour(Failure_behaviour eb)
Failure_behaviour
Behavior of failures.
static Failure_behaviour _error_behaviour
COM_BEGIN_NAME_SPACE void printStackBacktrace()
Print the stack backtrace.
void assertion_fail(const char *, const char *, int, const char *)
Default error handler.
static void _standard_warning_handler(const char *, const char *expr, const char *file, int line, const char *msg)
Contains declarations of MPI subroutines used in Roccom.
static Failure_function _error_handler
CGAL_BEGIN_NAMESPACE void not_implemented()
static Failure_behaviour _warning_behaviour
static Failure_function _warning_handler
#define CGAL_BEGIN_NAMESPACE
static void _standard_error_handler(const char *what, const char *expr, const char *file, int line, const char *msg)
#define CGAL_END_NAMESPACE