error handling work

This commit is contained in:
Vitor Santos Costa
2016-09-27 12:31:12 -05:00
parent 97350da9bd
commit 51bf90908f
6 changed files with 34 additions and 35 deletions

View File

@@ -2079,9 +2079,9 @@ static Int jump_env(USES_REGS1) {
Yap_find_prolog_culprit(PASS_REGS1);
LOCAL_Error_TYPE = ERROR_EVENT;
t = ArgOfTerm(1, t);
if (IsApplTerm(t) && IsAtomTerm((t2 = ArgOfTerm(1,t)))) {
if (IsApplTerm(t) && IsAtomTerm((t2 = ArgOfTerm(1, t)))) {
LOCAL_ActiveError.errorAsText = AtomOfTerm(t2);
LOCAL_ActiveError.classAsText = NameOfFunctor(t);
LOCAL_ActiveError.classAsText = NameOfFunctor(FunctorOfTerm(t));
} else if (IsAtomTerm(t)) {
LOCAL_ActiveError.errorAsText = AtomOfTerm(t);
LOCAL_ActiveError.classAsText = NULL;