From 396c7dd7141c767d7ec607b1b2e9f44e7ccdf853 Mon Sep 17 00:00:00 2001
From: dtc <dtc>
Date: Sat, 19 Dec 1998 15:52:07 +0000
Subject: [PATCH] Add a simple-undefined-function condition. Rework a few error
 into simple-type-errors.

---
 code/error.lisp   | 20 ++++++++++++++++----
 code/exports.lisp |  3 ++-
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/code/error.lisp b/code/error.lisp
index 1a5aa0cb7..6d60c4091 100644
--- a/code/error.lisp
+++ b/code/error.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.52 1998/08/14 07:16:58 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.53 1998/12/19 15:52:07 dtc Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -20,7 +20,8 @@
 
 (in-package "KERNEL")
 (export '(layout-invalid condition-function-name simple-control-error
-	  simple-file-error simple-program-error simple-style-warning))
+	  simple-file-error simple-program-error simple-style-warning
+	  simple-undefined-function))
 
 (in-package "LISP")
 (export '(break error warn cerror
@@ -522,9 +523,17 @@
 	 (class (typecase thing
 		  (condition-class thing)
 		  (class
-		   (error "~S is not a condition class." thing))
+		   (error 'simple-type-error
+			  :datum thing
+			  :expected-type 'condition-class
+			  :format-control "~S is not a condition class."
+			  :format-arguments (list thing)))
 		  (t
-		   (error "Bad thing for class arg:~%  ~S" thing))))
+		   (error 'simple-type-error
+			  :datum thing
+			  :expected-type 'condition-class
+			  :format-control "Bad thing for class arg:~%  ~S"
+			  :format-arguments (list thing)))))
 	 (res (make-condition-object args)))
     (setf (%instance-layout res) (class-layout class))
     ;;
@@ -932,6 +941,9 @@
 	     (condition-function-name condition)
 	     (cell-error-name condition)))))
 
+(define-condition simple-undefined-function (simple-condition
+					     undefined-function) ())
+
 (define-condition arithmetic-error (error)
   ((operation :reader arithmetic-error-operation :initarg :operation
 	      :initform nil)
diff --git a/code/exports.lisp b/code/exports.lisp
index 5d8318513..cdfcb3b4c 100644
--- a/code/exports.lisp
+++ b/code/exports.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/exports.lisp,v 1.158 1998/10/04 07:37:24 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/exports.lisp,v 1.159 1998/12/19 15:52:06 dtc Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1663,6 +1663,7 @@
 	   "MAKE-UNDEFINED-CLASS" "%COMPILER-ONLY-DEFSTRUCT"
 	   "CLASS-DIRECT-SUPERCLASSES" "MAKE-LAYOUT" "SIMPLE-CONTROL-ERROR"
 	   "SIMPLE-FILE-ERROR" "SIMPLE-PROGRAM-ERROR" "SIMPLE-STYLE-WARNING"
+	   "SIMPLE-UNDEFINED-FUNCTION"
 	   "BYTE-FUNCTION-TYPE" "SLOT-CLASS-PRINT-FUNCTION"
 	   "REDEFINE-LAYOUT-WARNING" "SLOT-CLASS" "INSURED-FIND-CLASS"
 	   "CONDITION-FUNCTION-NAME"))
-- 
GitLab