Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 56479 invoked by uid 500); 2 Jun 2001 18:44:28 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Delivered-To: moderator for cocoon-dev@xml.apache.org Received: (qmail 53039 invoked from network); 2 Jun 2001 18:43:58 -0000 Message-ID: <001601c0eb93$ff44e940$01c8c8c3@RAEL> From: "Carsten Ziegeler" To: Subject: RE: [C2] Patch: ArrayIndexOutOfBoundsException after other exceptions Date: Sat, 2 Jun 2001 20:38:20 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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