Skip to content
Snippets Groups Projects
Commit 0ca9f451 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Added new_error() and ERROR().

Rev: src/error.h:1.15
parent f52cf69b
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\*/ \*/
/* /*
* $Id: error.h,v 1.14 1998/03/28 15:31:41 grubba Exp $ * $Id: error.h,v 1.15 1998/04/10 15:22:38 grubba Exp $
*/ */
#ifndef ERROR_H #ifndef ERROR_H
#define ERROR_H #define ERROR_H
...@@ -79,6 +79,12 @@ extern int throw_severity; ...@@ -79,6 +79,12 @@ extern int throw_severity;
#define UNSET_ONERROR(X) recoveries && (recoveries->onerror=X.previous) #define UNSET_ONERROR(X) recoveries && (recoveries->onerror=X.previous)
#endif #endif
#ifdef DEBUG
#define ERROR(NAME, TEXT, SP, ARGS) new_error(NAME, TEXT, SP, ARGS, __FILE__, __LINE__);
#else
#define ERROR(NAME, TEXT, SP, ARGS) new_error(NAME, TEXT, SP, ARGS, NULL, 0);
#endif /* DEBUG */
/* Prototypes begin here */ /* Prototypes begin here */
JMP_BUF *init_recovery(JMP_BUF *r); JMP_BUF *init_recovery(JMP_BUF *r);
void pike_throw(void) ATTRIBUTE((noreturn)); void pike_throw(void) ATTRIBUTE((noreturn));
...@@ -86,6 +92,8 @@ void va_error(char *fmt, va_list args) ATTRIBUTE((noreturn)); ...@@ -86,6 +92,8 @@ void va_error(char *fmt, va_list args) ATTRIBUTE((noreturn));
void exit_on_error(void *msg); void exit_on_error(void *msg);
void fatal_on_error(void *msg); void fatal_on_error(void *msg);
void error(char *fmt,...) ATTRIBUTE((noreturn,format (printf, 1, 2))); void error(char *fmt,...) ATTRIBUTE((noreturn,format (printf, 1, 2)));
void new_error(char *name, char *text, struct svalue *oldsp, INT32 args,
char *file, int line) ATTRIBUTE((noreturn));
void debug_fatal(char *fmt, ...) ATTRIBUTE((noreturn,format (printf, 1, 2))); void debug_fatal(char *fmt, ...) ATTRIBUTE((noreturn,format (printf, 1, 2)));
/* Prototypes end here */ /* Prototypes end here */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment