This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/CXX/yapie.hh

34 lines
858 B
C++
Raw Normal View History

2014-06-30 14:34:58 +01:00
2016-09-21 20:41:23 +01:00
#ifndef YAPIE_HH
#define YAPIE_HH
2014-06-30 14:34:58 +01:00
2016-09-21 20:41:23 +01:00
class YAPPPredicate;
class YAPTerm;
/// take information on a Prolog error:
2014-06-30 14:34:58 +01:00
class YAPError {
2016-09-23 03:53:42 +01:00
std::string name, errorClass, info;
int swigcode;
2016-09-21 20:41:23 +01:00
2014-06-30 14:34:58 +01:00
public:
2016-09-21 20:41:23 +01:00
/// error handling when receiving the error term
YAPError(){};
/// we just know the error number
/// exact error ID
yap_error_number getID() { return LOCAL_ActiveError.errorNo; };
/// class of error
yap_error_class_number getErrorClass() {
return Yap_errorClass(LOCAL_ActiveError.errorNo);
};
/// where in the code things happened;
const char *getFile() { return LOCAL_ActiveError.errorFile; };
/// predicate things happened;
Int getLine() { return LOCAL_ActiveError.errorLine; };
/// the term that caused the bug
// YAPTerm getCulprit(LOCAL_ActiveError.errorFile){};
/// text describing the Error
2015-07-06 12:01:55 +01:00
const char *text();
2014-07-10 15:07:55 +01:00
};
2014-06-30 14:34:58 +01:00
2016-09-21 20:41:23 +01:00
#endif