Mon Nov 23 13:19:59 UTC 2009 pix@kepibu.org * Fail unification if no match for a selector diff -rN -u old-Oh, Ducks!/notes new-Oh, Ducks!/notes --- old-Oh, Ducks!/notes 2013-08-10 17:39:27.000000000 +0000 +++ new-Oh, Ducks!/notes 2013-08-10 17:39:27.000000000 +0000 @@ -109,8 +109,6 @@ I also recommend submitting a patch. Other people might want to use that selector, too! -* Known Bugs -** Failure to match results in NIL, rather than a unification-failure * To Do ** working lhtml/xmls support [1/2] * [X] non-descendant cases (class, id, etc.) diff -rN -u old-Oh, Ducks!/tests.lisp new-Oh, Ducks!/tests.lisp --- old-Oh, Ducks!/tests.lisp 2013-08-10 17:39:27.000000000 +0000 +++ new-Oh, Ducks!/tests.lisp 2013-08-10 17:39:27.000000000 +0000 @@ -53,7 +53,7 @@ "
I do not like cheese.
I like cheese.
") (values div i)) -#+FIXME ;; should throw 'unification-failure +;; throws 'unification-failure (match (#T(html (:model dom) ("q" . ?div)) "
I do not like cheese.
I like cheese.
") diff -rN -u old-Oh, Ducks!/unify.lisp new-Oh, Ducks!/unify.lisp --- old-Oh, Ducks!/unify.lisp 2013-08-10 17:39:27.000000000 +0000 +++ new-Oh, Ducks!/unify.lisp 2013-08-10 17:39:27.000000000 +0000 @@ -20,6 +20,10 @@ (t (let ((val (find-matching-elements css-specifier document))) (cond + ((null val) + (error 'unification-failure + :format-control "Unable to unify ~s and ~s" + :format-arguments (list css-specifier template))) ((unify::template-p template) (unify template val env)) ((unify::variablep template)