pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:10:   #include "stralloc.h"   #include "builtin_functions.h"   #include "array.h"   #include "object.h"      #undef ATTRIBUTE   #define ATTRIBUTE(X)      char *automatic_fatal, *exit_on_error;   JMP_BUF *recoveries=0; - ONERROR *onerror_stack=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=onerror_stack; +  r->onerror=0;    recoveries=r;    return r;   }      void throw() ATTRIBUTE((noreturn))   {    if(!recoveries)    fatal("No error recovery context.\n");      #ifdef DEBUG
pike.git/src/error.c:48:   #endif    free_object(fp->current_object);    free_program(fp->context.prog);       fp = fp->parent_frame;    }       pop_n_elems(sp - evaluator_stack - recoveries->sp);    mark_sp = mark_stack + recoveries->mark_sp;    -  while(recoveries->onerror != onerror_stack) +  while(recoveries->onerror)    { - #ifdef DEBUG -  if(!onerror_stack) -  fatal("Popped out of onerror stack!\n"); - #endif -  (*onerror_stack->func)(onerror_stack->arg); -  onerror_stack=onerror_stack->previous; +  (*recoveries->onerror->func)(recoveries->onerror->arg); +  recoveries->onerror=recoveries->onerror->previous;    }       longjmp(recoveries->recovery,1);   }      struct svalue throw_value = { T_INT };      void va_error(char *fmt, va_list args) ATTRIBUTE((noreturn))   {    char buf[2000];