error handling in C++ and OO languages
More...
error handling in C++ and OO languages
These classes define an object that we can then throw when an error or unexoected event interrupts YAP Often, the object is built by YAP itself One can also define one's own error objects
Errors will be thrown from the C++
code, and may be processed in very different ways The error object should provide as much data as possible
◆ YAPError
take information on a Prolog error:
Definition at line 31 of file yapie.hh.
Public Member Functions |
| YAPError () |
| wraps the default error descriptor More...
|
|
| YAPError (yap_error_descriptor_t *des) |
| if des != nullptr, wrap a preexisting error descriptor; otherwise, generate a new one More...
|
|
| YAPError (const char *file, const char *function, int lineno, yap_error_number id, YAP_Term culprit, const char *txt) |
| error handler object with initial data when receiving the error term More...
|
|
yap_error_number | getID () |
| we just know the error number exact error ID More...
|
|
yap_error_class_number | getErrorClass () |
| class of error More...
|
|
const char * | getFile () |
| where in the code things happened; More...
|
|
Int | getLine () |
| predicate things happened; More...
|
|
std::string | text () |
| the term that caused the bug More...
|
|
◆ YAPError() [1/3]
wraps the default error descriptor
Definition at line 37 of file yapie.hh.
◆ YAPError() [2/3]
if des != nullptr, wrap a preexisting error descriptor; otherwise, generate a new one
Definition at line 46 of file yapie.hh.
◆ YAPError() [3/3]
YAPError |
( |
const char * |
file, |
|
|
const char * |
function, |
|
|
int |
lineno, |
|
|
yap_error_number |
id, |
|
|
YAP_Term |
culprit, |
|
|
const char * |
txt |
|
) |
| |
|
inline |
error handler object with initial data when receiving the error term
error handler object with initial data when receiving the error term
Definition at line 64 of file yapie.hh.
◆ getErrorClass()
yap_error_class_number getErrorClass |
( |
| ) |
|
|
inline |
class of error
Definition at line 77 of file yapie.hh.
◆ getFile()
where in the code things happened;
Definition at line 81 of file yapie.hh.
◆ getID()
yap_error_number getID |
( |
| ) |
|
|
inline |
we just know the error number exact error ID
Definition at line 75 of file yapie.hh.
◆ getLine()
predicate things happened;
Definition at line 83 of file yapie.hh.
◆ text()
std::string text |
( |
void |
| ) |
|
the term that caused the bug
text describing the Error
Definition at line 1202 of file yapi.cpp.
◆ YAPPPredicate
class X_API YAPPPredicate |