cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject RE: [C2] Patch: ArrayIndexOutOfBoundsException after other exceptions
Date Mon, 04 Jun 2001 11:00:33 GMT
Jeff,
Modified ServerPagesGenerator as per your suggestion. Please make sure all's well.

Thanks,
dims

--- Carsten Ziegeler <c.ziegeler@online.de> wrote:
> Hi Jeff,
> 
> sorry, but I don't have enough knowledge of XSP and the generator
> to help here.
> Perhaps someone else of the comiiters could look at this?
> 
> Carsten
> 
> > Carsten,
> >
> > Thanks.  Clearing the stack after an exception didn't cause any problems
> in
> > my tests, but I agree there are probably cases when it would.
> >
> > I have one other related suggestion.  Currently if an XSP page generates
> an
> > exception other than IOException, SAXException, or ProcessingException, it
> > is caught but not re-thrown.  So, it doesn't end up being reported, and
> all
> > the user sees is a incomplete (although valid if the event stack clearing
> > worked) XML page.  It would be nice if any exception was reported through
> > the Cocoon XML page.  The workaround is to put a try/catch in the XSP page
> > and re-throw any exceptions as SAXExceptions, but I think that's more work
> > than it's worth (You have to do that anyway if you use any classes that
> > throw explict exceptions, but that's a different topic.)
> >
> > In ServerPagesGenerator.generate(), if the following line is added:
> >
> >     } catch (Exception e){
> >         getLogger().error("Exception in ServerPagesGenerator.generate()",
> > e);
> > >>>     throw new ProcessingException("Exception in
> > ServerPagesGenerator.generate()", e);
> >     } finally {
> >
> > Any other exception from the XSP page will be re-thrown and the Cocoon
> error
> > page will be displayed.  It also allows the XSP developer to catch the
> > exception and just return from the page to keep the error page from being
> > displayed and the normal event stack cleanup to occur.
> >
> > Let me know what you think.
> >
> > -------------------------
> > Jeff Skaistis
> > jeff.skaistis@alistia.com
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message