pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:17:      JMP_BUF *recoveries=0;      JMP_BUF *init_recovery(JMP_BUF *r)   {    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;    return r;   }    - void pike_throw(void) ATTRIBUTE((noreturn)) + void pike_throw() ATTRIBUTE((noreturn))   { -  +  while(recoveries && throw_severity > recoveries->severity) +  { +  while(recoveries->onerror) +  { +  (*recoveries->onerror->func)(recoveries->onerror->arg); +  recoveries->onerror=recoveries->onerror->previous; +  } +  +  recoveries=recoveries->previous; +  } +     if(!recoveries)    fatal("No error recovery context.\n");      #ifdef DEBUG    if(sp - evaluator_stack < recoveries->sp)    fatal("Stack error in error.\n");   #endif       while(fp != recoveries->fp)    {
pike.git/src/error.c:56:    while(recoveries->onerror)    {    (*recoveries->onerror->func)(recoveries->onerror->arg);    recoveries->onerror=recoveries->onerror->previous;    }       longjmp(recoveries->recovery,1);   }      struct svalue throw_value = { T_INT }; + int throw_severity;      void va_error(char *fmt, va_list args) ATTRIBUTE((noreturn))   {    char buf[2000];    static char *in_error;    if(in_error)    {    char *tmp=in_error;    in_error=0;    fatal("Recursive error() calls, original error: %s",tmp);
pike.git/src/error.c:91:       if((long)strlen(buf) >= (long)sizeof(buf))    fatal("Buffer overflow in error()\n");       push_string(make_shared_string(buf));    f_backtrace(0);    f_aggregate(2);    free_svalue(& throw_value);    sp--;    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    dump_backlog();   #endif