Implement error message for unrecognized slot options.
authorChris Hanson <org/chris-hanson/cph>
Tue, 8 Dec 1987 14:01:05 +0000 (14:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 8 Dec 1987 14:01:05 +0000 (14:01 +0000)
v7/src/runtime/defstr.scm

index 07e6c3299bad256e54e51ca980b2d96dca1374f3..698bdb89a83d6e355440a2cfc06a77dca079d5b6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/defstr.scm,v 1.4 1987/10/14 22:03:14 cph Rel $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/defstr.scm,v 1.5 1987/12/08 14:01:05 cph Exp $
 ;;;
 ;;;    Copyright (c) 1987 Massachusetts Institute of Technology
 ;;;
@@ -247,14 +247,17 @@ functionality is not implemented.
                 (read-only? false))
             (define (loop options)
               (if (not (null? options))
-                  (begin (case (car options)
-                           ((TYPE)
-                            (set! type
-                                  (parse/option-value (cadr options) true)))
-                           ((READ-ONLY)
-                            (set! read-only?
-                                  (parse/option-value (cadr options) true))))
-                         (loop (cddr options)))))
+                  (begin
+                    (case (car options)
+                      ((TYPE)
+                       (set! type (parse/option-value (cadr options) true)))
+                      ((READ-ONLY)
+                       (set! read-only?
+                             (parse/option-value (cadr options) true)))
+                      (else
+                       (error "Unrecognized structure slot option"
+                              (car options))))
+                    (loop (cddr options)))))
             (loop options)
             (vector name index default type read-only?)))))
     (if (pair? slot-description)