Bruno Borges wrote:
> 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."

If it's a checked exception, I would be curious what more do you do ?
let it go and declare  it so that it's handled by the reflection part of 
your page if any ?
wrap it around a runtime exception ?
wrap it around another checked exception which is 'maybe' handled by 
another handling exception code ?

The runtime exception when thrown will remind you right away that 
something is not correct. It will just remove unnecessary code on 
pageparameters handling, since there is nothing you can do to recover 
from an invalid type, which in itself is a programming error.

I have seen too many times things such as:

try {
} catch (SQLException e) {
    LOG.error("database error", e);
}
... some more code...

which generally make the whole thing crash 2K SLOC later with 5000 lines 
of different exception logged due to instability which makes the 
application crash with a totally cryptic unrelated message later.

Cheers,

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

Reply via email to