information-with-location class
make-condition-with-location function
make-file-location function
- noted
+ noted function
simple-condition-with-location class
simple-error-with-location class
simple-information class
\begin{describe}{fun}{info @<datum> \&rest @<arguments> @> @<flag>}
\end{describe}
-\begin{describe}{rst}{noted}
-\end{describe}
+\begin{describe*}
+ {\dhead{rst}{noted}
+ \dhead{fun}{noted \&optional @<condition>}}
+\end{describe*}
\begin{describe}{fun}{cerror* @<datum> \&rest @<arguments>}
\end{describe}
(define-condition simple-information (simple-condition information)
())
-(export '(info noted))
+(export 'info)
(defun info (datum &rest arguments)
"Report some useful diagnostic information.
(signal (designated-condition 'simple-information datum arguments))
(noted () :report "Noted." t)))
+(export 'noted)
+(defun noted (&optional condition)
+ "Invoke the `noted' restart, possibly associated with the given CONDITION."
+ (invoke-associated-restart 'noted condition))
+
(export 'simple-information-with-location)
(define-condition simple-information-with-location
(information-with-location simple-information)
(if fatal
(return-from count-and-report-errors*
(values nil errors warnings))
- (invoke-restart 'continue)))))
+ (continue error)))))
(warning (lambda (warning)
(format *error-output* "~&~A: Warning: ~A~%"
(file-location warning)
warning)
(incf warnings)
- (invoke-restart 'muffle-warning)))
+ (muffle-warning warning)))
(information (lambda (info)
(format *error-output* "~&~A: Info: ~A~%"
(file-location info)
info)
- (invoke-restart 'noted))))
+ (noted info))))
(values (funcall thunk)
errors
warnings)))
(with-parser-context (token-scanner-context :scanner scanner)
(multiple-value-bind (result winp consumedp)
(handler-bind ((error (lambda (cond)
- (declare (ignore cond))
(setf errors t)
- (if (find-restart 'continue)
- (invoke-restart 'continue)
+ (if (find-restart 'continue cond)
+ (continue cond)
:decline))))
(parse-property-set scanner))
(declare (ignore consumedp))
;;; Testing.
(defmethod perform ((op test-op) (system (eql (find-system "sod-test"))))
- (handler-bind (((or warning style-warning)
- (lambda (cond)
- (declare (ignore cond))
- (invoke-restart 'muffle-warning))))
+ (handler-bind (((or warning style-warning) #'muffle-warning))
(operate 'load-op system)
(let ((result (funcall (find-symbol "RUN-TESTS" "SOD-TEST"))))
(unless (funcall (find-symbol "WAS-SUCCESSFUL" "XLUNIT") result)
(defmethod perform ((op test-op) (component (eql (find-system "sod"))))
(declare (ignore op component))
- (handler-bind (((or warning style-warning)
- (lambda (cond)
- (declare (ignore cond))
- (invoke-restart 'muffle-warning))))
+ (handler-bind (((or warning style-warning) #'muffle-warning))
(operate 'test-op "sod-test")))
;;;----- That's all, folks --------------------------------------------------