Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Css: Parse failures return ParamFailure, not Empty

  • Loading branch information...
commit 8993a2b06d75777ab224ae1c97a2a1049c5af8c8 1 parent dfb39e0
@nafg nafg authored
View
2  core/util/src/main/scala/net/liftweb/util/CssSelector.scala
@@ -151,7 +151,7 @@ object CssSelectorParser extends PackratParsers with ImplicitConversions {
val reader: Input = new CharSequenceReader(toParse, 0)
topParser(reader) match {
case Success(v, _) => Full(v)
- case x => Empty
+ case x: NoSuccess => ParamFailure(x.msg, Empty, Empty, x)
}
}
View
2  core/util/src/test/scala/net/liftweb/util/CssSelectorSpec.scala
@@ -30,7 +30,7 @@ object CssSelectorSpec extends Specification {
"CssSelector" should {
"fail for garbage input" in {
- CssSelectorParser.parse(" 49234e23") must_== Empty
+ CssSelectorParser.parse(" 49234e23").isDefined must_== false
}
"select an id" in {

1 comment on commit 8993a2b

@fmpwizard
Owner

+1

Please sign in to comment.
Something went wrong with that request. Please try again.