enclosed-condition generic
enclosing-condition class
enclosing-condition-with-location class
+ enclosing-condition-with-location-type generic
enclosing-error-with-location class
enclosing-warning-with-location class
error-with-location function class
charbuf-scanner t
enclosed-condition
enclosing-condition
+enclosing-condition-with-location-type
+ cl:condition
+ cl:error
+ cl:warning
expand-parser-form
t (eql cl:and) t
t (eql cl:list) t
\&key :format-control :format-arguments :location}}
\end{describe*}
+\begin{describe}{gf}
+ {enclosing-condition-with-location-type @<condition> @> @<symbol>}
+\end{describe}
+
\begin{describe}{fun}
{make-condition-with-location @<default-type> @<floc>
@<datum> \&rest @<arguments>
;;;--------------------------------------------------------------------------
;;; Reporting errors.
+(export 'enclosing-condition-with-location-type)
+(defgeneric enclosing-condition-with-location-type (condition)
+ (:documentation
+ "Return a class suitable for attaching location information to CONDITION.
+
+ Specifically, return the name of a subclass of `enclosing-condition-
+ with-location' suitable to enclose CONDITION.")
+ (:method ((condition error)) 'enclosing-error-with-location)
+ (:method ((condition warning)) 'enclosing-warning-with-location)
+ (:method ((condition condition)) 'enclosing-condition-with-location))
+
(export 'make-condition-with-location)
(defun make-condition-with-location (default-type floc datum &rest arguments)
"Construct a `condition-with-location' given a condition designator.
(error "Argument list provided with specific condition")))
(wrap (condition)
(make-condition
- (etypecase condition
- (error 'enclosing-error-with-location)
- (warning 'enclosing-warning-with-location)
- (condition 'enclosing-condition-with-location))
+ (enclosing-condition-with-location-type condition)
:condition condition
:location (file-location floc)))
(make (type &rest initargs)