cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: [C2] Patch: ArrayIndexOutOfBoundsException after other exceptions
Date Sat, 02 Jun 2001 18:38:20 GMT
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,
> Thanks.  Clearing the stack after an exception didn't cause any problems
> my tests, but I agree there are probably cases when it would.
> I have one other related suggestion.  Currently if an XSP page generates
> exception other than IOException, SAXException, or ProcessingException, it
> is caught but not re-thrown.  So, it doesn't end up being reported, and
> 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
> 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

To unsubscribe, e-mail:
For additional commands, email:

View raw message