Changeset 282


Ignore:
Timestamp:
Jan 13, 2004, 5:01:36 PM (21 years ago)
Author:
Gary Byers
Message:

PARSE-ERROR isn't a STREAM-ERROR. Tail-call ERROR from SIGNAL-PROGRAM-ERROR, to keep it out of backtrace. UNDEFINED-FUNCTION-CALL: lose FUNCTION-NAME slot,
use CELL-ERROR-NAME instead.

Location:
trunk/ccl/level-1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-error-signal.lisp

    r243 r282  
    7878                 (call-special-operator-or-macro
    7979                  (make-condition condition-name
    80                                   :function-name (car errargs)
     80                                  :name (car errargs)
    8181                                  :function-arguments (cadr errargs)))
    8282                 (sequence-index-type-error
  • trunk/ccl/level-1/l1-error-system.lisp

    r244 r282  
    176176
    177177(defun signal-program-error (string &rest args)
    178   (error (make-condition 'simple-program-error
    179                          :format-control (if (fixnump string) (%rsc-string string) string)
    180                          :format-arguments args)))
     178  (let* ((e #'error))
     179    (funcall e
     180             (make-condition 'simple-program-error
     181                             :format-control (if (fixnump string) (%rsc-string string) string)
     182                             :format-arguments args))))
    181183
    182184(define-condition simple-destructuring-error (simple-program-error))
     
    327329(define-condition stream-error (error)
    328330  ((stream :initarg :stream :reader stream-error-stream)))
    329 (define-condition parse-error (stream-error) ())
     331(define-condition parse-error (error) ())
     332(define-condition parse-integer-not-integer-string (parse-error)
     333  ((string :initarg :string))
     334  (:report (lambda (c s)
     335             (format s "Not an integer string: ~s" (slot-value c 'string)))))
     336
    330337(define-condition reader-error (parse-error) ())
    331338(define-condition end-of-file (stream-error) ()
     
    383390  ((error-type :initform "Undefined function")))
    384391(define-condition undefined-function-call (control-error undefined-function)
    385   ((function-name :initarg :function-name :reader undefined-function-call-name)
    386    (function-arguments :initarg :function-arguments :reader undefined-function-call-arguments))
     392  ((function-arguments :initarg :function-arguments :reader undefined-function-call-arguments))
    387393  (:report (lambda (c s) (format s "Undefined function ~S called with arguments ~:S ."
    388                                  (undefined-function-call-name c)
     394                                 (cell-error-name c)
    389395                                 (undefined-function-call-arguments c)))))
    390396
    391397(define-condition call-special-operator-or-macro (undefined-function-call)
    392398  ()
    393   (:report (lambda (c s) (format s "Special operator or global macro-function ~s can't be FUNCALLed or APPLYed" (undefined-function-call-name c)))))
     399  (:report (lambda (c s) (format s "Special operator or global macro-function ~s can't be FUNCALLed or APPLYed" (cell-error-name c)))))
    394400
    395401 
     
    823829    (dbg function-name))   ; user should never see this
    824830  (let ((condition (make-condition 'undefined-function-call
    825                                    :function-name function-name
     831                                   :name function-name
    826832                                   :function-arguments args)))
    827833    (restart-case (%error condition nil frame-ptr)
Note: See TracChangeset for help on using the changeset viewer.