From 58f34f7a5fb53a7bcf2ada884199bfdc36f205f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 29 Sep 2015 23:11:00 +0100 Subject: [PATCH] first cut at detecting error source --- H/eval.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/H/eval.h b/H/eval.h index a8526ad18..4ba8a4273 100644 --- a/H/eval.h +++ b/H/eval.h @@ -378,8 +378,14 @@ Term Yap_eval_unary(Int,Term); Term Yap_eval_binary(Int,Term,Term); Term Yap_InnerEval__(Term USES_REGS); -Int Yap_ArithError(yap_error_number,Term,char *msg, ...); -yamop* Yap_EvalError(yap_error_number,Term,char *msg, ...); + + + +#define Yap_EvalError( id, t, ...) Yap_EvalError__(__FILE__, __FUNCTION__, __LINE__, id, t, __VA_ARGS__) +yamop *Yap_EvalError__(const char *, const char *, int, yap_error_number,Term, ...); + +#define Yap_ArithError( id, t, ...) Yap_ArithError__(__FILE__, __FUNCTION__, __LINE__, id, t, __VA_ARGS__) +Int Yap_ArithError__(const char *, const char *, int, yap_error_number,Term, ...); #include "inline-only.h"