Changeset 316


Ignore:
Timestamp:
Jan 17, 2004, 7:48:20 PM (21 years ago)
Author:
Gary Byers
Message:

WARN has to be more anal-retentive about the condition and any args it gets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-readloop-lds.lisp

    r6 r316  
    356356      nil)))
    357357
    358 (defun warn (format-string &rest args)
     358(defun warn (condition-or-format-string &rest args)
     359  (when (typep condition-or-format-string 'condition)
     360    (unless (typep condition-or-format-string 'warning)
     361      (report-bad-arg condition-or-format-string 'warning))
     362    (when args
     363      (error 'type-error :datum args :expected-type 'null
     364             :format-control "Extra arguments in ~s.")))
    359365  (let ((fp (%get-frame-ptr))
    360         (c (require-type (condition-arg format-string args 'simple-warning) 'warning)))
     366        (c (require-type (condition-arg condition-or-format-string args 'simple-warning) 'warning)))
    361367    (when *break-on-warnings*
    362368      (cbreak-loop "Warning" "Signal the warning." c fp))
Note: See TracChangeset for help on using the changeset viewer.