pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: error.c,v 1.169 2010/02/21 22:42:19 srb Exp $ + || $Id: error.c,v 1.170 2010/09/27 17:06:17 grubba Exp $   */      #define NO_PIKE_SHORTHAND   #include "global.h"   #include "svalue.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "interpret.h"   #include "stralloc.h"   #include "builtin_functions.h"
pike.git/src/error.c:128:   PMOD_EXPORT DECLSPEC(noreturn) void pike_throw(void) ATTRIBUTE((noreturn))   {   #ifdef TRACE_UNFINISHED_TYPE_FIELDS    accept_unfinished_type_fields++;   #endif       while(Pike_interpreter.recoveries && throw_severity > Pike_interpreter.recoveries->severity)    {    while(Pike_interpreter.recoveries->onerror)    { -  while(Pike_fp != Pike_interpreter.recoveries->onerror->frame_pointer) +  ONERROR *err = Pike_interpreter.recoveries->onerror; +  while(Pike_fp != err->frame_pointer)    {   #ifdef PIKE_DEBUG    if(!Pike_fp)    Pike_fatal("Popped out of stack frames.\n");   #endif    POP_PIKE_FRAME();    }    -  (*Pike_interpreter.recoveries->onerror->func)(Pike_interpreter.recoveries->onerror->arg); -  Pike_interpreter.recoveries->onerror=Pike_interpreter.recoveries->onerror->previous; +  Pike_interpreter.recoveries->onerror = err->previous; +  (*err->func)(err->arg);    }       {    JMP_BUF *prev_rec = Pike_interpreter.recoveries->previous;    if (Pike_interpreter.catch_ctx &&    (&Pike_interpreter.catch_ctx->recovery ==    Pike_interpreter.recoveries)) {    struct catch_context *cc = Pike_interpreter.catch_ctx;    Pike_interpreter.catch_ctx = cc->prev;    really_free_catch_context (cc);
pike.git/src/error.c:163:       if(!Pike_interpreter.recoveries)    Pike_fatal("No error recovery context.\n");       /* Don't pop the stack before the onerrors have run; they might need    * items from the stack.    */       while(Pike_interpreter.recoveries->onerror)    { -  while(Pike_fp != Pike_interpreter.recoveries->onerror->frame_pointer) +  ONERROR *err = Pike_interpreter.recoveries->onerror; +  +  while(Pike_fp != err->frame_pointer)    {   #ifdef PIKE_DEBUG    if(!Pike_fp)    Pike_fatal("Popped out of stack frames.\n");   #endif    POP_PIKE_FRAME();    } -  (*Pike_interpreter.recoveries->onerror->func)(Pike_interpreter.recoveries->onerror->arg); -  Pike_interpreter.recoveries->onerror=Pike_interpreter.recoveries->onerror->previous; +  Pike_interpreter.recoveries->onerror = err->previous; +  (*err->func)(err->arg);    }       while(Pike_fp != Pike_interpreter.recoveries->frame_pointer)    {   #ifdef PIKE_DEBUG    if(!Pike_fp)    Pike_fatal("Popped out of stack frames.\n");   #endif    POP_PIKE_FRAME();    }