From 12618d07b627a94ccdf36197a9e740ee3bedf22f Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Sat, 9 Nov 1991 20:49:49 +0000
Subject: [PATCH] Added NIL-FUNCTION-RETURNED-ERROR for flaming about functions
 that returned, but shouldn't have.

---
 code/interr.lisp | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/code/interr.lisp b/code/interr.lisp
index ffacbf3e6..eddf95562 100644
--- a/code/interr.lisp
+++ b/code/interr.lisp
@@ -7,11 +7,11 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/interr.lisp,v 1.18 1991/11/09 02:47:16 wlott Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/interr.lisp,v 1.19 1991/11/09 20:49:49 ram Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
-;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/interr.lisp,v 1.18 1991/11/09 02:47:16 wlott Exp $
+;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/interr.lisp,v 1.19 1991/11/09 20:49:49 ram Exp $
 ;;;
 ;;; Functions and macros to define and deal with internal errors (i.e.
 ;;; problems that can be signaled from assembler code).
@@ -51,7 +51,7 @@
 	  object-not-simple-array-single-float-error
 	  object-not-simple-array-double-float-error
 	  object-not-complex-error object-not-weak-pointer-error
-	  object-not-structure-error))
+	  object-not-structure-error nil-function-returned-error))
 
 
 
@@ -408,6 +408,15 @@
 	 :format-string "Attempt to THROW to a tag that does not exist: ~S"
 	 :format-arguments (list tag)))
 
+(deferr nil-function-returned-error
+  "Function with declared result type NIL returned."
+  (function)
+  (error 'control-error
+	 :function-name name
+	 :format-string
+	 "Function with declared result type NIL returned:~%  ~S"
+	 :format-arguments (list function)))
+
 (deferr division-by-zero-error
   "Attempt to divide by zero."
   (this that)
-- 
GitLab