I agree with you that it could be unchecked, but remember that PageParameters are sent by users in many different ways!

Users can change URL adding parameters, modifying values, removing other parameters, etc. So, I think that it could but probably is not the best way to go. Threating these convertions with checked exceptions give us (programmers) a rule to follow: "please, check parameters and alert user if he/she sent invalid values."

My vote? Keep it checked.

Regards,

On 8/15/06, Stephane Bailliez <[EMAIL PROTECTED]> wrote:
Hi all,

I was looking at the code for PageParameters and then StringValue in 1.2.1

StringValue is throwing a checked exception
StringValueConversionException for string converted to another type.

While I understand the motivation, it seems to me it would remove some
slight handling annoyance by putting it as an unchecked (ie: runtime)
exception.

Strictly speaking if such thing happen this is due to a mistake by
storing invalid types and therefore there is very little chance it to
recover from it in any sort of way. So you basically won't be able to do
anything worth it with the checked exception.

If however someone is doing some clever trick and handling multiple
types in a strange way, then I guess, it makes sense for this person to
try/catch unchecked exception and try to recover by asking another type,
etc...

So I'm voting to have StringValueConversionException extends
RuntimeException instead of Exception :)

Maybe I have missed something obvious though.

WDYT ?

Stephane


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop



--
Bruno Borges
Summa Technologies Inc.
www.summa-tech.com
(11) 8565-7739 - (11) 3846-1622
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to