debug exc

This commit is contained in:
Vítor Santos Costa
2018-04-09 02:00:51 +01:00
parent 7ce963b63c
commit 2d19db5fce
20 changed files with 581 additions and 503 deletions

View File

@@ -2055,15 +2055,12 @@ bool Yap_JumpToEnv(void) {
/* This does very nasty stuff!!!!! */
static Int jump_env(USES_REGS1) {
Term t = Deref(ARG1), t0 = t, t1;
Term t = Deref(ARG1), t0 = t;
if (IsVarTerm(t)) {
Yap_Error(INSTANTIATION_ERROR, t, "throw ball must be bound");
return false;
} else if (IsApplTerm(t) && FunctorOfTerm(t) == FunctorError
&& (t1 = ArgOfTerm(1, t))
&& IsPairTerm((t = ArgOfTerm(2, t)))
&& IsApplTerm((t = HeadOfTerm(t)))) {
LOCAL_ActiveError = Yap_UserError(t, t1, LOCAL_ActiveError);
} else if (IsApplTerm(t) && FunctorOfTerm(t) == FunctorError) {
LOCAL_ActiveError = Yap_UserError(t0, LOCAL_ActiveError);
} else {
LOCAL_Error_TYPE = THROW_EVENT;
LOCAL_ActiveError->errorAsText = NULL;