make sure we separate betwen async exceptions and synchroneous.

This commit is contained in:
Vítor Santos Costa
2010-12-04 19:05:13 +00:00
parent c6f41e2970
commit 8db05c883b
7 changed files with 36 additions and 4 deletions

View File

@@ -1511,7 +1511,10 @@ JumpToEnv(Term t) {
EX = BallTerm;
BallTerm = NULL;
P = (yamop *)FAILCODE;
Yap_signal(YAP_FAIL_SIGNAL);
/* make sure failure will be seen at next port */
if (Yap_PrologMode & AsyncIntMode) {
Yap_signal(YAP_FAIL_SIGNAL);
}
HB = B->cp_h;
return TRUE;
}
@@ -1553,7 +1556,9 @@ JumpToEnv(Term t) {
/* B->cp_h = H; */
/* I could backtrack here, but it is easier to leave the unwinding
to the emulator */
Yap_signal(YAP_FAIL_SIGNAL);
if (Yap_PrologMode & AsyncIntMode) {
Yap_signal(YAP_FAIL_SIGNAL);
}
P = (yamop *)FAILCODE;
HB = B->cp_h;
/* try to recover space */