Commit a06f9f7f authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Add report function for duplicate-names (fix lp bug 557306)

parent 08267f16
......@@ -735,7 +735,10 @@ actually-existing directory."
((components :initarg :components :reader circular-dependency-components)))
(define-condition duplicate-names (system-definition-error)
((name :initarg :name :reader duplicate-names-name)))
((name :initarg :name :reader duplicate-names-name))
(:report (lambda (c s)
(format s "~@<Error while defining system: multiple components are given same name ~A~@:>"
(duplicate-names-name c)))))
(define-condition missing-component (system-definition-error)
((requires :initform "(unnamed)" :reader missing-requires :initarg :requires)
......@@ -1948,8 +1951,7 @@ Returns the new tree (which probably shares structure with the old one)"
(loop :for c in (module-components ret) :do
(if (gethash (component-name c)
name-hash)
(error 'duplicate-names
:name (component-name c))
(error 'duplicate-names :name (component-name c))
(setf (gethash (component-name c)
name-hash)
t)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment