From: Adrian B. <ej...@us...> - 2003-06-17 21:58:52
|
User: ejort Date: 03/06/17 14:58:51 Modified: src/main/org/jboss/deployment XSLSubDeployer.java Log: More useful error message when the xsl is unavaiable Revision Changes Path 1.12 +13 -5 jboss-system/src/main/org/jboss/deployment/XSLSubDeployer.java Index: XSLSubDeployer.java =================================================================== RCS file: /cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/XSLSubDeployer.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- XSLSubDeployer.java 16 Jun 2003 02:01:43 -0000 1.11 +++ XSLSubDeployer.java 17 Jun 2003 21:58:51 -0000 1.12 @@ -1,7 +1,13 @@ -package org.jboss.deployment; - - +/*************************************** + * * + * JBoss: The OpenSource J2EE WebOS * + * * + * Distributable under LGPL license. * + * See terms of license at gnu.org. * + * * + ***************************************/ +package org.jboss.deployment; import java.io.IOException; import java.io.InputStream; @@ -44,7 +50,7 @@ * * @author <a href="mailto:d_j...@us...">David Jencks</a> * @author <a href="mailto:Chr...@in...">Christoph G. Jung</a> - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ * * @jmx.mbean name="jboss.system:service=XSLDeployer" * extends="org.jboss.deployment.SubDeployerMBean" @@ -340,11 +346,13 @@ TransformerFactory tf = TransformerFactory.newInstance(); - tf.setErrorListener(new LocalErrorListener()); SAXReader sr = new SAXReader(); InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(xslUrl); + if (is == null) + throw new DeploymentException("Cannot locate xslUrl=" + xslUrl); + DocumentSource ds = new DocumentSource(sr.read(is)); templates = tf.newTemplates(ds); if (dependsXslUrl != null && dependsXslUrl.length() != 0) |