pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:9:   #include "interpret.h"   #include "stralloc.h"   #include "builtin_functions.h"   #include "array.h"   #include "object.h"   #include "main.h"   #include "builtin_functions.h"   #include "backend.h"   #include "operators.h"    - RCSID("$Id: error.c,v 1.21 1998/07/16 23:09:39 hubbe Exp $"); + RCSID("$Id: error.c,v 1.22 1998/11/22 11:02:44 hubbe Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)      JMP_BUF *recoveries=0;      JMP_BUF *init_recovery(JMP_BUF *r DEBUG_LINE_ARGS)   { - #ifdef DEBUG + #ifdef PIKE_DEBUG    r->line=line;    r->file=file;   #endif    r->fp=fp;    r->sp=sp-evaluator_stack;    r->mark_sp=mark_sp - mark_stack;    r->previous=recoveries;    r->onerror=0;    r->severity=THROW_ERROR;    recoveries=r;
pike.git/src/error.c:48:    (*recoveries->onerror->func)(recoveries->onerror->arg);    recoveries->onerror=recoveries->onerror->previous;    }       recoveries=recoveries->previous;    }       if(!recoveries)    fatal("No error recovery context.\n");    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(sp - evaluator_stack < recoveries->sp)    fatal("Stack error in error.\n");   #endif       while(fp != recoveries->fp)    { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(!fp)    fatal("Popped out of stack frames.\n");   #endif    free_object(fp->current_object);    free_program(fp->context.prog);    if(fp->context.parent)    free_object(fp->context.parent);       fp = fp->parent_frame;    }
pike.git/src/error.c:113:    in_error=buf;      #ifdef HAVE_VSNPRINTF    vsnprintf(buf, 4090, fmt, args);   #else /* !HAVE_VSNPRINTF */    VSPRINTF(buf, fmt, args);   #endif /* HAVE_VSNPRINTF */       if(!recoveries)    { - #ifdef DEBUG + #ifdef PIKE_DEBUG    dump_backlog();   #endif       fprintf(stderr,"No error recovery context!\n%s",buf);    exit(99);    }       if((long)strlen(buf) >= (long)sizeof(buf))    fatal("Buffer overflow in error()\n");   
pike.git/src/error.c:149:    {    const char *tmp=in_error;    in_error=0;    fatal("Recursive error() calls, original error: %s",tmp);    }       in_error=text;       if(!recoveries)    { - #ifdef DEBUG + #ifdef PIKE_DEBUG    dump_backlog();   #endif       fprintf(stderr,"No error recovery context!\n%s():%s",name,text);    exit(99);    }       push_text(text);       f_backtrace(0);
pike.git/src/error.c:191:    free_svalue(& throw_value);    throw_value = *--sp;    throw_severity=THROW_ERROR;       in_error=0;    pike_throw(); /* Hope someone is catching, or we will be out of balls. */   }      void exit_on_error(void *msg)   { - #ifdef DEBUG + #ifdef PIKE_DEBUG    dump_backlog();   #endif    fprintf(stderr,"%s\n",(char *)msg);    exit(1);   }      void fatal_on_error(void *msg)   { - #ifdef DEBUG + #ifdef PIKE_DEBUG    dump_backlog();   #endif    fprintf(stderr,"%s\n",(char *)msg);    abort();   }      void error(const char *fmt,...) ATTRIBUTE((noreturn,format (printf, 1, 2)))   {    va_list args;    va_start(args,fmt);
pike.git/src/error.c:229:    static int in_fatal = 0;       va_start(args,fmt);    /* Prevent double fatal. */    if (in_fatal)    {    (void)VFPRINTF(stderr, fmt, args);    abort();    }    in_fatal = 1; - #ifdef DEBUG + #ifdef PIKE_DEBUG    dump_backlog();   #endif       (void)VFPRINTF(stderr, fmt, args);       d_flag=t_flag=0;    push_error("Attempting to dump backlog (may fail).\n");    APPLY_MASTER("describe_backtrace",1);    if(sp[-1].type==T_STRING)    write_to_stderr(sp[-1].u.string->str, sp[-1].u.string->len);       fflush(stderr);    abort();   }