From 0ca9f451de18f64d3ff2c3ed3dc67d5f22022f48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Fri, 10 Apr 1998 17:22:38 +0200
Subject: [PATCH] Added new_error() and ERROR().

Rev: src/error.h:1.15
---
 src/error.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/error.h b/src/error.h
index bf39b6f3d2..f19447e4d2 100644
--- a/src/error.h
+++ b/src/error.h
@@ -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
 #define ERROR_H
@@ -79,6 +79,12 @@ extern int throw_severity;
 #define UNSET_ONERROR(X) recoveries && (recoveries->onerror=X.previous)
 #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 */
 JMP_BUF *init_recovery(JMP_BUF *r);
 void pike_throw(void) ATTRIBUTE((noreturn));
@@ -86,6 +92,8 @@ void va_error(char *fmt, va_list args) ATTRIBUTE((noreturn));
 void exit_on_error(void *msg);
 void fatal_on_error(void *msg);
 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)));
 /* Prototypes end here */
 
-- 
GitLab