stop counters at counter underflow event
This commit is contained in:
parent
4d6cd779cb
commit
ff20a23e64
11
C/errors.c
11
C/errors.c
@ -518,20 +518,27 @@ Yap_Error(yap_error_number type, Term where, char *format,...)
|
||||
break;
|
||||
case CALL_COUNTER_UNDERFLOW:
|
||||
/* Do a long jump */
|
||||
PredEntriesCounter--;
|
||||
ReductionsCounterOn = FALSE;
|
||||
PredEntriesCounterOn = FALSE;
|
||||
RetriesCounterOn = FALSE;
|
||||
Yap_JumpToEnv(MkAtomTerm(AtomCallCounter));
|
||||
P = (yamop *)FAILCODE;
|
||||
Yap_PrologMode &= ~InErrorMode;
|
||||
return(P);
|
||||
case PRED_ENTRY_COUNTER_UNDERFLOW:
|
||||
/* Do a long jump */
|
||||
ReductionsCounterOn = FALSE;
|
||||
PredEntriesCounterOn = FALSE;
|
||||
RetriesCounterOn = FALSE;
|
||||
Yap_JumpToEnv(MkAtomTerm(AtomCallAndRetryCounter));
|
||||
P = (yamop *)FAILCODE;
|
||||
Yap_PrologMode &= ~InErrorMode;
|
||||
return(P);
|
||||
case RETRY_COUNTER_UNDERFLOW:
|
||||
/* Do a long jump */
|
||||
PredEntriesCounter--;
|
||||
ReductionsCounterOn = FALSE;
|
||||
PredEntriesCounterOn = FALSE;
|
||||
RetriesCounterOn = FALSE;
|
||||
Yap_JumpToEnv(MkAtomTerm(AtomRetryCounter));
|
||||
P = (yamop *)FAILCODE;
|
||||
Yap_PrologMode &= ~InErrorMode;
|
||||
|
Reference in New Issue
Block a user