pike.git / src / pike_error.h

version» Context lines:

pike.git/src/pike_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: pike_error.h,v 1.10 2001/03/07 12:15:27 grubba Exp $ +  * $Id: pike_error.h,v 1.11 2001/03/28 10:02:42 hubbe Exp $    */ - #ifndef ERROR_H - #define ERROR_H + #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 + #define fatal \ +  (fprintf(stderr,"%s:%d: Fatal error:\n",__FILE__,__LINE__),debug_fatal) + #else + /* This is useful when debugging assembler code sometimes... -Hubbe */ + #define 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 *);      #ifndef STRUCT_FRAME_DECLARED   #define STRUCT_FRAME_DECLARED   struct pike_frame;   #endif   
pike.git/src/pike_error.h:222:   PMOD_EXPORT void DECLSPEC(noreturn) permission_error(    char *func,    struct svalue *base_sp, int args,    char *permission_type,    char *desc, ...) ATTRIBUTE((noreturn, format(printf, 5, 6)));   PMOD_EXPORT void wrong_number_of_args_error(char *name, int args, int expected);   void init_error(void);   void cleanup_error(void);   /* Prototypes end here */    - #if 1 - #define fatal \ -  (fprintf(stderr,"%s:%d: Fatal error:\n",__FILE__,__LINE__),debug_fatal) - #else - /* This is useful when debugging assembler code sometimes... -Hubbe */ - #define fatal \ -  (fprintf(stderr,"%s: Fatal error:\n",__FILE__ ":" DEFINETOSTR(__LINE__) ),debug_fatal) - #endif -  +    /* Some useful error macros. */         #define SIMPLE_BAD_ARG_ERROR(FUNC, ARG, EXPECT) \    bad_arg_error(FUNC, Pike_sp-args, args, ARG, EXPECT, Pike_sp+ARG-1-args,\    "Bad argument %d to %s(). Expected %s\n", \    ARG, FUNC, EXPECT)      #define SIMPLE_TOO_FEW_ARGS_ERROR(FUNC, ARG) \    bad_arg_error(FUNC, Pike_sp-args, args, ARG, "void", 0,\
pike.git/src/pike_error.h:295:    UNSETJMP(exception); \    if(__exception_rethrow) \    rethrow; \    } \    while(0)      /* Generic error stuff */   #define ERR_EXT_DECLARE   #include "errors.h"    - #endif + #endif /* PIKE_ERROR_H */