X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcondition.lisp;h=99375b46e782b4d322a74fba1cd70c2e473d723f;hb=2db3b6b4cb740d5b6512459c223859f747807b09;hp=1e5c7c7bb3bb57934e74dd59bff0619401ae879c;hpb=93ba859423ec6e035a7b22a76a2ac70038691d65;p=sbcl.git diff --git a/src/code/condition.lisp b/src/code/condition.lisp index 1e5c7c7..99375b4 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -604,6 +604,13 @@ "The function ~S is undefined." (cell-error-name condition))))) +(define-condition special-form-function (undefined-function) () + (:report + (lambda (condition stream) + (format stream + "Cannot FUNCALL the SYMBOL-FUNCTION of special operator ~S." + (cell-error-name condition))))) + (define-condition arithmetic-error (error) ((operation :reader arithmetic-error-operation :initarg :operation @@ -689,15 +696,31 @@ "The index ~S is too large." (type-error-datum condition))))) -;;; Out-of-range &KEY END arguments are similar to, but off by one -;;; from out-of-range indices into the sequence. -(define-condition index-too-large-error (type-error) - () +(define-condition bounding-indices-bad-error (type-error) + ((object :reader bounding-indices-bad-object :initarg :object)) (:report (lambda (condition stream) - (format stream - "The end-of-sequence specifier ~S is too large." - (type-error-datum condition))))) + (let* ((datum (type-error-datum condition)) + (start (car datum)) + (end (cdr datum)) + (object (bounding-indices-bad-object condition))) + (etypecase object + (sequence + (format stream + "The bounding indices ~S and ~S are bad for a sequence of length ~S." + start end (length object))) + (array + ;; from WITH-ARRAY-DATA + (format stream + "The START and END parameters ~S and ~S are bad for an array of total size ~S." + start end (array-total-size object)))))))) + +(define-condition nil-array-accessed-error (type-error) + () + (:report (lambda (condition stream) + (format stream + "An attempt to access an array of element-type ~ + NIL was made. Congratulations!")))) (define-condition io-timeout (stream-error) ((direction :reader io-timeout-direction :initarg :direction))