pike.git / src / error.h

version» Context lines:

pike.git/src/error.h:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: error.h,v 1.25 1998/11/22 11:02:45 hubbe Exp $ +  * $Id: error.h,v 1.26 1999/01/21 09:15:00 hubbe Exp $    */   #ifndef ERROR_H   #define ERROR_H      #include "machine.h"      #ifdef HAVE_SETJMP_H   #include <setjmp.h>   #undef HAVE_SETJMP_H   #endif
pike.git/src/error.h:88:   #define SETJMP(X) setjmp((init_recovery(&X)->recovery))   #define UNSETJMP(X) recoveries=X.previous;   #endif         #ifdef PIKE_DEBUG   #define SET_ONERROR(X,Y,Z) \    do{ \    OED_FPRINTF((stderr, "SET_ONERROR(%p, %p, %p) %s:%d\n", \    &(X), (Y), (Z), __FILE__, __LINE__)); \ -  if(!recoveries) break; \ +     X.func=(error_call)(Y); \    X.arg=(void *)(Z); \ -  +  if(!recoveries) break; \    X.previous=recoveries->onerror; \    X.file = __FILE__; \    X.line = __LINE__; \    recoveries->onerror=&X; \    }while(0)      #define UNSET_ONERROR(X) do {\    OED_FPRINTF((stderr, "UNSET_ONERROR(%p) %s:%d\n", \    &(X), __FILE__, __LINE__)); \    if(!recoveries) break; \
pike.git/src/error.h:114:    fatal("UNSET_ONERROR out of sync.\n" \    "Last SET_ONERROR is from %s:%d\n", \    recoveries->onerror->file, recoveries->onerror->line ); \    } else { \    fatal("UNSET_ONERROR out of sync. No recoveries left.\n"); \    } \    } \    recoveries->onerror=(X).previous; \    } while(0)    + #define CALL_AND_UNSET_ONERROR(X) do { \ +  X.func(X.arg); \ +  UNSET_ONERROR(X); \ +  }while(0) +    #define ASSERT_ONERROR(X) \    do{ \    if (!recoveries) break; \    if (recoveries->onerror != &X) { \    fatal("%s:%d ASSERT_ONERROR(%p) failed\n", \    __FILE__, __LINE__, &(X)); \    } \    }while(0)   #else /* !PIKE_DEBUG */   #define SET_ONERROR(X,Y,Z) \