syntax_error now throws error;
fix handling of error if no top-level handler is available git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@440 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
9
C/exec.c
9
C/exec.c
@@ -1256,11 +1256,11 @@ Int
|
||||
JumpToEnv(Term t) {
|
||||
yamop *pos = (yamop *)(PredDollarCatch->LastClause);
|
||||
CELL *env;
|
||||
choiceptr first_func = NULL;
|
||||
choiceptr first_func = NULL, B0 = B;
|
||||
|
||||
do {
|
||||
/* find the first choicepoint that may be a catch */
|
||||
while (B->cp_ap != pos) {
|
||||
while (B != NULL && B->cp_ap != pos) {
|
||||
/* we are already doing a catch */
|
||||
if (B->cp_ap == (yamop *)(PredHandleThrow->LastClause)) {
|
||||
if (DelayedB == NULL || YOUNGER_CP(B,DelayedB))
|
||||
@@ -1275,6 +1275,11 @@ JumpToEnv(Term t) {
|
||||
first_func = B;
|
||||
B = B->cp_b;
|
||||
}
|
||||
/* uncaught throw */
|
||||
if (B == NULL) {
|
||||
B = B0;
|
||||
siglongjmp(RestartEnv,1);
|
||||
}
|
||||
/* is it a continuation? */
|
||||
env = B->cp_env;
|
||||
while (env > ENV)
|
||||
|
Reference in New Issue
Block a user