val limit = request.queryString.get("limit").flatMap{
import scala.util.control.Exception._;
catching(classOf[NumberFormatException]) opt _(0).toInt
}.getOrElse(10)
val limit = request.getFirstParam("limit").parseOptionInt.getOrElse(10).
Why don’t you catch this parameter from your route definition?
GET /list controllers.App.list(p: Option[Int])
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.