<snip>
> Actually, somehow it doesn't seem right to use exceptions for normal
> situations since exceptions should be rasied when something bad happened
> (Joshua Bloch), but since we already do...
>
> Thoughts?
>
> -Vjeran
Actually, that's been nagging at me as well since I've had it drilled into
my head over and over again "never use exceptions for flow control". I'd
pretty much gotten over it until this afternoon when I was writing some
tapestry code that went like ...
...
super.saveRecord(writer, cycle);
Writer.print("Total time to process this request : " + clock);
...
Only to discover my log messages never, ever, came out. The culprit? I was
using a redirectexception in super.saveRecord() to support the
post->redirect-> get pattern I've implemented in every web app I've ever
written (talk about repetitive :)).
Ultimately though I never bothered squawking about Tapestry's use of
exceptions for flow control because I figured it was pretty deeply
integrated into the system at this point. In other words, its water under
the bridge so there's no point stressing over it.
Likewise, I'm actually not sure if there's a general consensus against using
exceptions for flow control in the community at large. It makes me wince
when I see it, but that doesn't mean it's generally bad practice, just that
it's not *my* practice, and lord knows my practices aren't always the best
:).
--- Pat
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]