pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:410:    return;    }    SET_ONERROR(tmp,fatal_on_error,"Fatal in exit_on_error!");    d_flag=0;    Pike_interpreter.trace_level = 0;       if (inhibit_errors)    fprintf (stderr, "Got recursive error in exit_on_error: %s\n", (char *) msg);       else { -  dynamic_buffer save_buf; +  struct byte_buffer buf = BUFFER_INIT();    char *s;    struct svalue thrown;       inhibit_errors = 1;      #ifdef PIKE_DEBUG    if (d_flag) {    fprintf(stderr,"%s\n",(char *)msg);    dump_backlog();    }   #endif       fprintf(stderr,"%s\n",(char *)msg);       /* We've reserved LOW_SVALUE_STACK_MARGIN and LOW_C_STACK_MARGIN    * for this. */    Pike_interpreter.svalue_stack_margin = 0;    Pike_interpreter.c_stack_margin = 0;    fprintf(stderr,"Attempting to dump raw error: (may fail)\n"); -  init_buf(&save_buf); +     move_svalue (&thrown, &throw_value);    mark_free_svalue (&throw_value); -  describe_svalue(&thrown,0,0); +  describe_svalue(&buf, &thrown,0,0);    free_svalue (&thrown); -  s=simple_free_buf(&save_buf); -  fprintf(stderr,"%s\n",s); -  free(s); +  fprintf(stderr,"%s\n",buffer_get_string(&buf)); +  buffer_free(&buf);    }       exit(1);   }      #ifdef __NT__   /* Wrapper around abort() to avoid interactive requesters on NT. */   int fnordel=0;   static void do_abort()   {