BriteSnow / snow

A Lightweight, Google Guice, Simple, and Powerful Web Application Framework that makes building modern Web Application a breeze! Fully open source, Apache V2 licensed.
http://britesnow.com/snow
29 stars 10 forks source link

boolean WebParams crashes? #40

Open Ueland opened 10 years ago

Ueland commented 10 years ago

It appears that if i try to create the following WebModelHandler parameter, the page simply goes white/empty. I suspect it being a crash not appearing in the logs somewhere (not even a server error)

@WebParam("test") boolean test

If i change it to:

@WebParam("test") String test

Then it works just fine.

jeremychone commented 10 years ago

Ok, I will look at it.

Btw,

@Webparam("test") Boolean test 

Should work no?

So, the bug here is that it should log an error, but at present primitive raw type are not supported as sometime could be null.

Ueland commented 10 years ago

Yes, that does work.

The same thing goes for other basic types, like Integer vs int. I realised afterwards that the error i described in #42 is a result of such user error.

So the template cannot be found, and give a white page instead of stating that there is an error in the java code itself. Which again causes the developer to investigate the error in the wrong place.