pike.git / src / pike_error.h

version» Context lines:

pike.git/src/pike_error.h: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: pike_error.h,v 1.18 2002/05/31 22:41:25 nilsson Exp $ +  * $Id: pike_error.h,v 1.19 2002/08/15 14:49:24 marcus Exp $    */   #ifndef PIKE_ERROR_H   #define PIKE_ERROR_H      #include "machine.h"      #ifdef HAVE_SETJMP_H   #include <setjmp.h>   #undef HAVE_SETJMP_H   #endif      #include <stdarg.h>      #if 1   PMOD_EXPORT extern const char msg_fatal_error[]; - #define fatal \ + #define Pike_fatal \    (fprintf(stderr,msg_fatal_error,__FILE__,__LINE__),debug_fatal)   #else   /* This is useful when debugging assembler code sometimes... -Hubbe */ - #define fatal \ + #define Pike_fatal \    (fprintf(stderr,"%s: Fatal error:\n",__FILE__ ":" DEFINETOSTR(__LINE__) ),debug_fatal)   #endif      PMOD_EXPORT DECLSPEC(noreturn) void debug_fatal(const char *fmt, ...) ATTRIBUTE((noreturn,format (printf, 1, 2)));         #include "svalue.h"         typedef void (*error_call)(void *);
pike.git/src/pike_error.h:87: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG   PMOD_EXPORT extern const char msg_unsetjmp_nosync_1[];   PMOD_EXPORT extern const char msg_unsetjmp_nosync_2[];   #define UNSETJMP(X) do{ \    check_recovery_context(); \    OED_FPRINTF((stderr, "unsetjmp(%p) %s:%d\n", \    &(X), __FILE__, __LINE__)); \    if(Pike_interpreter.recoveries != &X) { \    if(Pike_interpreter.recoveries) \ -  fatal(msg_unsetjmp_nosync_1,Pike_interpreter.recoveries->file); \ +  Pike_fatal(msg_unsetjmp_nosync_1,Pike_interpreter.recoveries->file); \    else \ -  fatal(msg_unsetjmp_nosync_2); \ +  Pike_fatal(msg_unsetjmp_nosync_2); \    } \    Pike_interpreter.recoveries=X.previous; \    check_recovery_context(); \    }while (0)      #ifdef DMALLOC_LOCATION   #define PERR_LOCATION() DMALLOC_LOCATION()   #else   #define PERR_LOCATION() ( __FILE__ ":" DEFINETOSTR(__LINE__) )   #endif
pike.git/src/pike_error.h:137:   PMOD_EXPORT extern const char msg_unset_onerr_nosync_1[];   PMOD_EXPORT extern const char msg_unset_onerr_nosync_2[];   #define UNSET_ONERROR(X) do {\    check_recovery_context(); \    OED_FPRINTF((stderr, "UNSET_ONERROR(%p) %s:%d\n", \    &(X), __FILE__, __LINE__)); \    if(!Pike_interpreter.recoveries) break; \    if(Pike_interpreter.recoveries->onerror != &(X)) { \    fprintf(stderr,msg_last_setjmp,Pike_interpreter.recoveries->file); \    if (Pike_interpreter.recoveries->onerror) { \ -  fatal(msg_unset_onerr_nosync_1,\ +  Pike_fatal(msg_unset_onerr_nosync_1,\    Pike_interpreter.recoveries->onerror, &(X), \    Pike_interpreter.recoveries->onerror->file); \    } else { \ -  fatal(msg_unset_onerr_nosync_2); \ +  Pike_fatal(msg_unset_onerr_nosync_2); \    } \    } \    Pike_interpreter.recoveries->onerror=(X).previous; \    } while(0)      PMOD_EXPORT extern const char msg_assert_onerr[];   #define ASSERT_ONERROR(X) \    do{ \    if (!Pike_interpreter.recoveries) break; \    if (Pike_interpreter.recoveries->onerror != &X) { \ -  fatal(msg_assert_onerr, \ +  Pike_fatal(msg_assert_onerr, \    __FILE__, __LINE__, &(X)); \    } \    }while(0)   #else /* !PIKE_DEBUG */   #define SET_ONERROR(X,Y,Z) \    do{ \    X.func=(error_call)(Y); \    X.arg=(void *)(Z); \    if(!Pike_interpreter.recoveries) break; \    X.previous=Pike_interpreter.recoveries->onerror; \