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:
vsc
2002-04-11 15:31:58 +00:00
parent 03484b9960
commit 13cb0c1e13
5 changed files with 205 additions and 212 deletions

View File

@@ -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)