Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 17556 invoked from network); 26 Nov 2000 15:48:54 -0000 Received: from cmailg7.svr.pol.co.uk (195.92.195.177) by locus.apache.org with SMTP; 26 Nov 2000 15:48:54 -0000 Received: from modem-51.tennessee.dialup.pol.co.uk ([62.137.93.51] helo=hydrogen) by cmailg7.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 14042u-0005Ub-00 for cocoon-dev@xml.apache.org; Sun, 26 Nov 2000 15:48:52 +0000 Received: from paulr by hydrogen with local (Exim 3.16 #1 (Debian)) id 140458-0000bu-00 for ; Sun, 26 Nov 2000 15:51:10 +0000 Date: Sun, 26 Nov 2000 15:51:10 +0000 From: Paul Russell To: cocoon-dev@xml.apache.org Subject: Re: [C2] [Patch] More verbose exception handling in server pages Message-ID: <20001126155110.B554@hydrogen.internal.luminas.co.uk> References: <20001126153730.A554@hydrogen.internal.luminas.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001126153730.A554@hydrogen.internal.luminas.co.uk>; from paul@luminas.co.uk on Sun, Nov 26, 2000 at 03:37:31PM +0000 Organisation: Luminas Ltd. Sender: Paul Russell X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Nov 26, 2000 at 03:37:31PM +0000, Paul Russell wrote: > Hi guys, > > Attached is a patch to make the exception handling in the > server pages engine a little more verbose - I was having > rather more problems than I would hope trying to track down > that problem in the xsp logicsheet.... Write out 100 times, I will double check my patches before attaching them... I will double check my patches before attaching them... I will double check my patches before attaching them... Please find attached a new version which won't play with your classpath ;) P. -- Paul Russell Technical Director, http://www.luminas.co.uk Luminas Ltd. --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="exception-verbose.diff" Index: src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java =================================================================== RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/components/language/programming/java/Attic/JavaLanguage.java,v retrieving revision 1.1.2.11 diff -u -r1.1.2.11 JavaLanguage.java --- src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java 2000/11/10 22:38:54 1.1.2.11 +++ src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java 2000/11/26 15:19:24 @@ -117,7 +117,7 @@ return this.classLoaderManager.loadClass(name.replace(File.separatorChar, '.')); } catch (Exception e) { - throw new LanguageException(e.getMessage()); + throw new LanguageException("Could not load class for program '" + name + "' due to a " + e.getClass().getName() + ": " + e.getMessage()); } } @@ -201,7 +201,7 @@ try { return ((Class) program).newInstance(); } catch (Exception e) { - throw new LanguageException(e.getMessage()); + throw new LanguageException("Could not instantiate program instance due to a " + e.getClass().getName() + ": " + e.getMessage()); } } --LpQ9ahxlCli8rRTG--