hakandilek / publicplay

PublicPlay is yet another forum application built with the play framework.
Other
13 stars 6 forks source link

invalid post link #76

Closed hakandilek closed 11 years ago

hakandilek commented 11 years ago

an invalid post link like /posts/7'0/samsung_nx1000_fotograf_makinesi gives the error message: For request 'GET /posts/7'0/samsung_nx1000_fotograf_makinesi' [Cannot parse parameter key as Long: For input string: "7'0"] that must be replaced with a message like no such post.

hakandilek commented 11 years ago

Also an invalid Post URL leads to an server side exception:

2013-01-05T01:20:06+00:00 app[web.1]: play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[NullPointerException: null]]
2013-01-05T01:20:06+00:00 app[web.1]:   at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor-2.0.2.jar:2.0.2]
2013-01-05T01:20:06+00:00 app[web.1]:   at views.html.postShow$.apply(postShow.template.scala:43) ~[kiyakfiyat.com_2.9.1-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
2013-01-05T01:20:06+00:00 app[web.1]:   at controllers.PostController.show(PostController.java:272) ~[kiyakfiyat.com_2.9.1-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
2013-01-05T01:20:06+00:00 app[web.1]: Caused by: java.lang.NullPointerException: null
2013-01-05T01:20:06+00:00 app[web.1]:   at views.html.postShow.render(postShow.template.scala) ~[kiyakfiyat.com_2.9.1-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
2013-01-05T01:20:06+00:00 app[web.1]:   at Routes$$anonfun$routes$1$$anonfun$apply$25$$anonfun$apply$26.apply(routes_routing.scala:284) ~[kiyakfiyat.com_2.9.1-0.1.0-SNAPSHOT.jar:na]