pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:15:   #include "array.h"   #include "object.h"   #include "main.h"   #include "builtin_functions.h"   #include "backend.h"   #include "operators.h"   #include "module_support.h"   #include "threads.h"   #include "gc.h"    - RCSID("$Id: error.c,v 1.85 2002/05/31 22:41:23 nilsson Exp $"); + RCSID("$Id: error.c,v 1.86 2002/08/15 14:49:21 marcus Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)      PMOD_EXPORT const char msg_fatal_error[] =    "%s:%d: Fatal error:\n";   #ifdef PIKE_DEBUG   PMOD_EXPORT const char msg_unsetjmp_nosync_1[] =    "UNSETJMP out of sync! (last SETJMP at %s)!\n";   PMOD_EXPORT const char msg_unsetjmp_nosync_2[] =
pike.git/src/error.c:69: Inside #if defined(PIKE_DEBUG)
  PMOD_EXPORT void check_recovery_context(void)   {    char foo;   #define TESTILITEST ((((char *)Pike_interpreter.recoveries)-((char *)&foo))*STACK_DIRECTION)    if(Pike_interpreter.recoveries && TESTILITEST > 0) {    fprintf(stderr, "Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %ld)!\n",    Pike_interpreter.recoveries, &foo,    DO_NOT_WARN((long)TESTILITEST));    fprintf(stderr, "Last recovery was added at %s\n",    Pike_interpreter.recoveries->file); -  fatal("Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %ld)!\n", +  Pike_fatal("Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %ld)!\n",    Pike_interpreter.recoveries, &foo,    DO_NOT_WARN((long)TESTILITEST));    }       /* Add more stuff here when required */   }      PMOD_EXPORT void pike_gdb_breakpoint(void)   {   }
pike.git/src/error.c:114:    while(Pike_interpreter.recoveries->onerror)    {    (*Pike_interpreter.recoveries->onerror->func)(Pike_interpreter.recoveries->onerror->arg);    Pike_interpreter.recoveries->onerror=Pike_interpreter.recoveries->onerror->previous;    }       Pike_interpreter.recoveries=Pike_interpreter.recoveries->previous;    }       if(!Pike_interpreter.recoveries) -  fatal("No error recovery context.\n"); +  Pike_fatal("No error recovery context.\n");      #ifdef PIKE_DEBUG    if(Pike_sp - Pike_interpreter.evaluator_stack < Pike_interpreter.recoveries->stack_pointer) -  fatal("Stack error in error.\n"); +  Pike_fatal("Stack error in error.\n");   #endif       while(Pike_fp != Pike_interpreter.recoveries->frame_pointer)    {   #ifdef PIKE_DEBUG    if(!Pike_fp) -  fatal("Popped out of stack frames.\n"); +  Pike_fatal("Popped out of stack frames.\n");   #endif    POP_PIKE_FRAME();    }       pop_n_elems(Pike_sp - Pike_interpreter.evaluator_stack - Pike_interpreter.recoveries->stack_pointer);    Pike_mark_sp = Pike_interpreter.mark_stack + Pike_interpreter.recoveries->mark_sp;       while(Pike_interpreter.recoveries->onerror)    {    (*Pike_interpreter.recoveries->onerror->func)(Pike_interpreter.recoveries->onerror->arg);
pike.git/src/error.c:189:    * Check sizes of arguments passed!    */   void DECLSPEC(noreturn) va_error(const char *fmt, va_list args) ATTRIBUTE((noreturn))   {    char buf[4096];    SWAP_IN_THREAD_IF_REQUIRED();    if(in_error)    {    const char *tmp=in_error;    in_error=0; -  fatal("Recursive error() calls, original error: %s",tmp); +  Pike_fatal("Recursive error() calls, original error: %s",tmp);    }       in_error=buf;      #ifdef HAVE_VSNPRINTF    vsnprintf(buf, 4090, fmt, args);   #else /* !HAVE_VSNPRINTF */    VSPRINTF(buf, fmt, args);   #endif /* HAVE_VSNPRINTF */   
pike.git/src/error.c:211: Inside #if defined(PIKE_DEBUG)
   {   #ifdef PIKE_DEBUG    dump_backlog();   #endif       fprintf(stderr,"No error recovery context!\n%s",buf);    exit(99);    }       if((size_t)strlen(buf) >= (size_t)sizeof(buf)) -  fatal("Buffer overflow in error()\n"); +  Pike_fatal("Buffer overflow in error()\n");       low_error(buf);   }      PMOD_EXPORT DECLSPEC(noreturn) void new_error(const char *name, const char *text, struct svalue *oldsp,    INT32 args, const char *file, int line) ATTRIBUTE((noreturn))   {    int i;       ASSERT_THREAD_SWAPPED_IN();       if(in_error)    {    const char *tmp=in_error;    in_error=0; -  fatal("Recursive error() calls, original error: %s",tmp); +  Pike_fatal("Recursive error() calls, original error: %s",tmp);    }       in_error=text;       if(!Pike_interpreter.recoveries)    {   #ifdef PIKE_DEBUG    dump_backlog();   #endif   
pike.git/src/error.c:559: Inside #if defined(HAVE_VSNPRINTF)
     #ifdef HAVE_VSNPRINTF    vsnprintf(buf, sizeof(buf)-1, fmt, foo);   #else /* !HAVE_VSNPRINTF */    /* Sentinel that will be overwritten on buffer overflow. */    buf[sizeof(buf)-1] = '\0';       VSPRINTF(buf, fmt, foo);       if(buf[sizeof(buf)-1]) -  fatal("Buffer overflow in error()\n"); +  Pike_fatal("Buffer overflow in error()\n");   #endif /* HAVE_VSNPRINTF */    in_error=buf;       if (!master_program) {    fprintf(stderr, "ERROR: %s\n", buf);    }       ERROR_STRUCT(generic,o)->desc=make_shared_string(buf);    f_backtrace(0);   
pike.git/src/error.c:584:    push_text(func);       for (i=0;i<args;i++)    push_svalue(base_sp + i);    f_aggregate(args + 3);    f_aggregate(1);    f_add(2);    }       if(Pike_sp[-1].type!=PIKE_T_ARRAY) -  fatal("Error failed to generate a backtrace!\n"); +  Pike_fatal("Error failed to generate a backtrace!\n");       ERROR_STRUCT(generic,o)->backtrace=Pike_sp[-1].u.array;    Pike_sp--;    dmalloc_touch_svalue(Pike_sp);       free_svalue(& throw_value);    throw_value.type=PIKE_T_OBJECT;    throw_value.u.object=o;    throw_severity = THROW_ERROR;    in_error=0;