dims 02/01/30 11:21:26
Modified: src/java/org/apache/cocoon/components/language/markup
LogicsheetCodeGenerator.java
Log:
If there is a cause exception, rethrow the cause else throw the actual exception
itself. This prevents NullPointerException in case the cause exception is not present.
Revision Changes Path
1.6 +7 -3
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/LogicsheetCodeGenerator.java
Index: LogicsheetCodeGenerator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/LogicsheetCodeGenerator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- LogicsheetCodeGenerator.java 26 Jan 2002 17:13:33 -0000 1.5
+++ LogicsheetCodeGenerator.java 30 Jan 2002 19:21:26 -0000 1.6
@@ -34,7 +34,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
- * @version CVS $Revision: 1.5 $ $Date: 2002/01/26 17:13:33 $
+ * @version CVS $Revision: 1.6 $ $Date: 2002/01/30 19:21:26 $
*/
public class LogicsheetCodeGenerator extends AbstractLoggable implements
MarkupCodeGenerator {
@@ -134,8 +134,12 @@
this.rootReader.parse(input);
return this.writer.toString();
} catch (SAXException e) {
- getLogger().debug("Got SAXException; Rethrowing cause exception", e);
- throw e.getException();
+ if(e.getException() != null) {
+ getLogger().debug("Got SAXException; Rethrowing cause exception",
e);
+ throw e.getException();
+ }
+ getLogger().debug("Got SAXException", e);
+ throw e;
}
}
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]