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 14785 invoked from network); 26 Nov 2000 15:35:27 -0000 Received: from mail12.svr.pol.co.uk (195.92.193.215) by locus.apache.org with SMTP; 26 Nov 2000 15:35:27 -0000 Received: from modem-51.tennessee.dialup.pol.co.uk ([62.137.93.51] helo=hydrogen) by mail12.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 1403pp-0002r1-00 for cocoon-dev@xml.apache.org; Sun, 26 Nov 2000 15:35:22 +0000 Received: from paulr by hydrogen with local (Exim 3.16 #1 (Debian)) id 1403rv-0000WL-00 for ; Sun, 26 Nov 2000 15:37:31 +0000 Date: Sun, 26 Nov 2000 15:37:31 +0000 From: Paul Russell To: cocoon-dev@xml.apache.org Subject: [C2] [Patch] More verbose exception handling in server pages Message-ID: <20001126153730.A554@hydrogen.internal.luminas.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline User-Agent: Mutt/1.2.5i Organisation: Luminas Ltd. Sender: Paul Russell X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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.... Paul -- Paul Russell Technical Director, http://www.luminas.co.uk Luminas Ltd. --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="exception-verbose.diff" ? build ? diff ? lib/xalan.jar ? lib/postgresql.jar ? webapp/docs/samples/xsp/ejb.xsp Index: build.sh =================================================================== RCS file: /home/cvspublic/xml-cocoon/build.sh,v retrieving revision 1.10.2.18 diff -u -r1.10.2.18 build.sh --- build.sh 2000/11/16 17:22:45 1.10.2.18 +++ build.sh 2000/11/26 15:18:15 @@ -18,7 +18,7 @@ # ----- Set Up The Runtime Classpath ------------------------------------------ -CP=$JAVA_HOME/lib/tools.jar:$ANT_HOME/lib/ant_1_2.jar:./lib/xerces_1_2_1.jar +CP=$JAVA_HOME/lib/tools.jar:$ANT_HOME/lib/ant_1_2.jar:$ANT_HOME/lib/ant.jar:./lib/xerces_1_2_1.jar # ----- Make sure Ant script is executable ------------------------------------ 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()); } } Index: webapp/cocoon.xconf =================================================================== RCS file: /home/cvspublic/xml-cocoon/webapp/Attic/cocoon.xconf,v retrieving revision 1.1.2.9 diff -u -r1.1.2.9 cocoon.xconf --- webapp/cocoon.xconf 2000/11/13 18:14:53 1.1.2.9 +++ webapp/cocoon.xconf 2000/11/26 15:19:58 @@ -47,6 +47,12 @@ + + + + + + --2oS5YaxWCcQjTEyO--