i wouldn't do both examples with exceptions.
Why not just redirect to a page? That displays the nice example? Why do
that through an exception
that you you are going to catch anyway and that redirect to a page.
johan
Phil Kulak wrote:
I didn't get much input on this when I was commenting in another's
thread, so I thought I'd start a whole topic on it. Anyway, is it
planned to give the developer some way to get at thrown exceptions in
a central place and handle them? I keep coming on situations when I
need to do this, and I have no idea how to go about it.
Some examples. You've got a shopping cart and a checkout process. You
don't want the user to be able to start the checkout process with an
empty cart. My first instinct is to check for an empty cart on
construction and throw a custom exception if the cart's empty, but
since I can't get to it further up the stack, that doesn't get me
anywhere.
Or how about if I user tries to view a bookmarked page for an object
that doesn't exist anymore? You can't draw the page without an object
to draw from, so you throw an exception. It would be nice to then show
the user some friendly message ("the object doesn't exist
anymore..."), but currently your only options are a stack trace or a
general exception message.
What are the thoughts on this?
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop