![]() |
Prev | Next |
ErrorHandler
info(
handler)
ErrorHandler::Call(
known,
line,
file,
exp,
msg)
ErrorHandler
object,
the current CppAD error handler is replaced by handler.
When the object is destructed, the previous CppAD error handler is restored.
ErrorHandler::Call
is called,
the current CppAD error handler is used to report an error.
This starts out as a default error handler and can be replaced
using the ErrorHandler
constructor.
void (*
handler)
(bool, int, const char *, const char *, const char *);
When an error is detected,
it is called with the syntax
handler (
known,
line,
file,
exp,
msg)
This routine should not return; i.e., upon detection of the error,
the routine calling handler does not know how to proceed.
bool
known
If it is true, the error being reported is from a know problem.
int
line
It reports the source code line number where the error is detected.
const char *
file
and is a '\0'
terminated character vector.
It reports the source code file where the error is detected.
const char *
exp
and is a '\0'
terminated character vector.
It is a source code boolean expression that should have been true,
but is false,
and thereby causes this call to handler.
const char *
msg
and is a '\0'
terminated character vector.
It reports the meaning of the error from the C++ programmers point of view.