Fix CERROR when given a condition datum.
... arguments are simply passed to the continue format control.
** constraint propagation and lambda variable substitution are
more cautious in dealing with partially deleted code.
** compiler sometimes lost reoptimization passes.
+ ** CERROR, given a condition as condition designator, passes its
+ remaining arguments to the continue format control without
+ complaint.
changes in sbcl-0.8.16 relative to sbcl-0.8.15:
* enhancement: saving cores with foreign code loaded is now
(let ((condition (coerce-to-condition datum
arguments
'simple-error
- 'error))
+ 'cerror))
(sb!debug:*stack-top-hint* (maybe-find-stack-top-hint)))
(with-condition-restarts condition (list (find-restart 'continue))
(let ((sb!debug:*stack-top-hint* nil))
;;; single argument that's directly usable by all the other routines.
(defun coerce-to-condition (datum arguments default-type fun-name)
(cond ((typep datum 'condition)
- (if arguments
- (cerror "Ignore the additional arguments."
- 'simple-type-error
- :datum arguments
- :expected-type 'null
- :format-control "You may not supply additional arguments ~
- when giving ~S to ~S."
- :format-arguments (list datum fun-name)))
+ (when (and arguments (not (eq fun-name 'cerror)))
+ (cerror "Ignore the additional arguments."
+ 'simple-type-error
+ :datum arguments
+ :expected-type 'null
+ :format-control "You may not supply additional arguments ~
+ when giving ~S to ~S."
+ :format-arguments (list datum fun-name)))
datum)
((symbolp datum) ; roughly, (SUBTYPEP DATUM 'CONDITION)
(apply #'make-condition datum arguments))
(test t)
(test 42)
(test (make-instance 'standard-object)))
+
+;;; If CERROR is given a condition, any remaining arguments are only
+;;; used for the continue format control.
+(let ((x 0))
+ (handler-bind
+ ((simple-error (lambda (c) (incf x) (continue c))))
+ (cerror "Continue from ~A at ~A"
+ (make-condition 'simple-error :format-control "foo"
+ :format-arguments nil)
+ 'cerror (get-universal-time))
+ (assert (= x 1))))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.16.27"
+"0.8.16.28"