pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:13:   #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.48 2000/04/17 04:55:45 hubbe Exp $"); + RCSID("$Id: error.c,v 1.49 2000/04/17 21:06:24 hubbe Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)      JMP_BUF *recoveries=0;      #ifdef PIKE_DEBUG   void check_recovery_context(void)   {    char foo;
pike.git/src/error.c:220:    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)   {    ONERROR tmp;    SET_ONERROR(tmp,fatal_on_error,"Fatal in exit_on_error!"); +  d_flag=0;       fprintf(stderr,"%s\n",(char *)msg);   #ifdef PIKE_DEBUG    dump_backlog();   #endif    fprintf(stderr,"%s\n",(char *)msg);   #ifdef PIKE_DEBUG    {    char *s;    fprintf(stderr,"Attempting to dump raw error: (may fail)\n");
pike.git/src/error.c:287:    if(Pike_in_gc)    {    fprintf(stderr,"Pike was in GC stage %d when this fatal occured:\n",Pike_in_gc);    Pike_in_gc=0;    }    }       (void)VFPRINTF(stderr, fmt, args);       d_flag=t_flag=0; -  push_error("Attempting to dump backlog (may fail).\n"); +  if(!Pike_sp) +  { +  fprintf(stderr,"Attempting to dump backlog (may fail)...\n"); +  push_error("Backtrace at time of fatal:\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); -  +  }else{ +  fprintf(stderr,"No stack - no backtrace.\n"); +  }    fflush(stderr);    abort();   }      #if 1      #define ERR_DECLARE   #include "errors.h"