Well, I'm not sure there is any one correct answer. I personally would
view this no differently than I view any other exception thrown in a
Struts app, which means I would use a GlobalExceptionHandler.
I'm not sure what is considered best practice, but my approach is that I
only try...catch blocks where I know an exception could occur and I know
I can properly handle it or recover from it in some way (i.e., maybe I'm
making a Web Service call to a remote system and if it fails there is a
secondary machine I can try).
Any place else I let "unhandled" exceptions be thrown and allow the
Struts exception handling mechanism to do its thing. In your case, I
would think it falls in the unhandled exception category, that'd be my
take on it anyway.
Frank
Lucas Bern wrote:
What I mean is, I have to implement a getStreamInfo method that returns an
instance of an implementation of StreamInfo, if during the execution of this
method some exception is thrown, what to do???
Should I override the "execute" method surrounding a call to "super.execute"
with try catch???
I just want to know the best way to do it...
Lucas
"Frank W. Zammetti" <[EMAIL PROTECTED]> escribió:
You mean as far as what the user sees goes? I wouldn't think you would
handle it any differently than you would any other exception that might
happen in an Action. I personally use the GlobalExceptionHandler
mechanism in Struts... after the handler writes out some log info and
such, I forward to a page to display my exception. As long as the user
clicks the link that calls your DownloadAction rather than right-click
and Save As, this should work.
Is that what you meant though, or did I misunderstand the question?
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]