clean
This commit is contained in:
parent
8e52352878
commit
9e01be6a22
12
C/errors.c
12
C/errors.c
@ -325,8 +325,7 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
CELL nt[3];
|
CELL nt[3];
|
||||||
Functor fun;
|
Functor fun;
|
||||||
bool serious;
|
bool error_t, comment;
|
||||||
Term tf, error_t, comment;
|
|
||||||
char *format;
|
char *format;
|
||||||
char s[MAXPATHLEN];
|
char s[MAXPATHLEN];
|
||||||
|
|
||||||
@ -343,8 +342,8 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
|||||||
where = TermNil;
|
where = TermNil;
|
||||||
}
|
}
|
||||||
// first, obtain current location
|
// first, obtain current location
|
||||||
sprintf(LOCAL_FileNameBuf, "%s:%d in C-function %s ", file, lineno, function);
|
// sprintf(LOCAL_FileNameBuf, "%s:%d in C-function %s ", file, lineno, function);
|
||||||
tf = MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf));
|
// tf = MkAtomTerm(Yap_LookupAtom(LOCAL_FileNameBuf));
|
||||||
#if DEBUG_STRICT
|
#if DEBUG_STRICT
|
||||||
if (Yap_heap_regs && !(LOCAL_PrologMode & BootMode))
|
if (Yap_heap_regs && !(LOCAL_PrologMode & BootMode))
|
||||||
fprintf(stderr, "***** Processing Error %d (%lx,%x) %s***\n", type,
|
fprintf(stderr, "***** Processing Error %d (%lx,%x) %s***\n", type,
|
||||||
@ -434,7 +433,7 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case SYSTEM_ERROR_INTERNAL: {
|
case SYSTEM_ERROR_INTERNAL: {
|
||||||
fprintf(stderr, "%% Internal YAP Error: %s exiting....\n", tmpbuf);
|
fprintf(stderr, "%% Internal YAP Error: %s exiting....\n", tmpbuf);
|
||||||
serious = TRUE;
|
// serious = true;
|
||||||
if (LOCAL_PrologMode & BootMode) {
|
if (LOCAL_PrologMode & BootMode) {
|
||||||
fprintf(stderr, "%% YAP crashed while booting %s\n", tmpbuf);
|
fprintf(stderr, "%% YAP crashed while booting %s\n", tmpbuf);
|
||||||
} else {
|
} else {
|
||||||
@ -450,7 +449,6 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
|||||||
fprintf(stderr, "Execution stack:\n");
|
fprintf(stderr, "Execution stack:\n");
|
||||||
for (i = 0; i < frames; ++i) {
|
for (i = 0; i < frames; ++i) {
|
||||||
fprintf(stderr, " %s\n", strs[i]);
|
fprintf(stderr, " %s\n", strs[i]);
|
||||||
|
|
||||||
}
|
}
|
||||||
free(strs);
|
free(strs);
|
||||||
#endif
|
#endif
|
||||||
@ -467,7 +465,7 @@ yamop *Yap_Error__(const char *file, const char *function, int lineno,
|
|||||||
case ABORT_EVENT:
|
case ABORT_EVENT:
|
||||||
nt[0] = MkAtomTerm(AtomDAbort);
|
nt[0] = MkAtomTerm(AtomDAbort);
|
||||||
fun = FunctorDollarVar;
|
fun = FunctorDollarVar;
|
||||||
serious = TRUE;
|
// serious = true;
|
||||||
break;
|
break;
|
||||||
case CALL_COUNTER_UNDERFLOW_EVENT:
|
case CALL_COUNTER_UNDERFLOW_EVENT:
|
||||||
/* Do a long jump */
|
/* Do a long jump */
|
||||||
|
Reference in New Issue
Block a user