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.88 2002/09/21 16:29:43 mast Exp $"); + RCSID("$Id: error.c,v 1.89 2002/09/24 13:08:09 mast 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:203: Inside #if defined(HAVE_VSNPRINTF)
     #ifdef HAVE_VSNPRINTF    vsnprintf(buf, 4090, fmt, args);   #else /* !HAVE_VSNPRINTF */    VSPRINTF(buf, fmt, args);   #endif /* HAVE_VSNPRINTF */       if(!Pike_interpreter.recoveries)    {   #ifdef PIKE_DEBUG +  if (d_flag) { +  fprintf(stderr,"No error recovery context!\n%s",buf);    dump_backlog(); -  +  }   #endif       fprintf(stderr,"No error recovery context!\n%s",buf);    exit(99);    }       if((size_t)strlen(buf) >= (size_t)sizeof(buf))    Pike_fatal("Buffer overflow in error()\n");       low_error(buf);
pike.git/src/error.c:235:    const char *tmp=in_error;    in_error=0;    Pike_fatal("Recursive error() calls, original error: %s",tmp);    }       in_error=text;       if(!Pike_interpreter.recoveries)    {   #ifdef PIKE_DEBUG +  if (d_flag) { +  fprintf(stderr,"No error recovery context!\n%s():%s",name,text);    dump_backlog(); -  +  }   #endif       fprintf(stderr,"No error recovery context!\n%s():%s",name,text);    if(file)    fprintf(stderr,"at %s:%d\n",file,line);    exit(99);    }       push_text(text);   
pike.git/src/error.c:287:   {    ONERROR tmp;    SET_ONERROR(tmp,fatal_on_error,"Fatal in exit_on_error!");    d_flag=0;       /* Tell sprintf(), describe_svalue() et al not to throw errors    * if possible.    */    Pike_inhibit_errors = 1;    -  fprintf(stderr,"%s\n",(char *)msg); +    #ifdef PIKE_DEBUG -  +  if (d_flag) { +  fprintf(stderr,"%s\n",(char *)msg);    dump_backlog(); -  +  }   #endif    fprintf(stderr,"%s\n",(char *)msg);   #ifdef PIKE_DEBUG    {    char *s;    fprintf(stderr,"Attempting to dump raw error: (may fail)\n");    init_buf();    describe_svalue(&throw_value,0,0);    s=simple_free_buf();    fprintf(stderr,"%s\n",s);
pike.git/src/error.c:326:   #else /* !__NT__ */   #define do_abort() abort()   #endif /* __NT__ */      PMOD_EXPORT void fatal_on_error(const void *msg)   {    /* It's ok if we're exiting. */    if (throw_severity == THROW_EXIT) return;      #ifdef PIKE_DEBUG +  if (d_flag) { +  fprintf(stderr,"%s\n",(char *)msg);    dump_backlog(); -  +  }   #endif    fprintf(stderr,"%s\n",(char *)msg);    do_abort();   }      PMOD_EXPORT DECLSPEC(noreturn) void Pike_error(const char *fmt,...) ATTRIBUTE((noreturn,format (printf, 1, 2)))   {    va_list args;    va_start(args,fmt);    va_error(fmt,args);
pike.git/src/error.c:356:       va_start(args,fmt);    /* Prevent double fatal. */    if (in_fatal)    {    (void)VFPRINTF(stderr, fmt, args);    do_abort();    }       in_fatal = 1; - #if 0 +    #ifdef PIKE_DEBUG -  +  if (d_flag) { +  (void)VFPRINTF(stderr, fmt, args);    dump_backlog(); -  +  }   #endif - #endif +        if(Pike_in_gc)    fprintf(stderr,"Pike was in GC stage %d when this fatal occured:\n",Pike_in_gc);    Pike_in_gc = GC_PASS_DISABLED;       (void)VFPRINTF(stderr, fmt, args);       d_flag=t_flag=0;    if(Pike_sp && Pike_interpreter.evaluator_stack &&    master_object && master_object->prog)