diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-07-28 13:00:11 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-07-28 13:00:11 +0000 |
commit | dde2759a2110f3ab7b5d54712591087109e7b84a (patch) | |
tree | 779e15cbc438f73292e4f9170587bb04ceca5bb4 /test/java/org/apache | |
parent | c75b57d5e0eb3bd0bdbfd7b968b55477f3de8249 (diff) | |
download | xmlgraphics-fop-dde2759a2110f3ab7b5d54712591087109e7b84a.tar.gz xmlgraphics-fop-dde2759a2110f3ab7b5d54712591087109e7b84a.zip |
Don't let Xalan's default error listener swallow exceptions.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@680337 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache')
-rw-r--r-- | test/java/org/apache/fop/intermediate/IFParserTestCase.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/intermediate/IFParserTestCase.java b/test/java/org/apache/fop/intermediate/IFParserTestCase.java index 92f63a334..af0040e67 100644 --- a/test/java/org/apache/fop/intermediate/IFParserTestCase.java +++ b/test/java/org/apache/fop/intermediate/IFParserTestCase.java @@ -22,10 +22,12 @@ package org.apache.fop.intermediate; import java.io.File; import java.io.OutputStream; +import javax.xml.transform.ErrorListener; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Templates; import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.sax.SAXResult; import javax.xml.transform.stream.StreamResult; @@ -68,6 +70,22 @@ public class IFParserTestCase extends AbstractIntermediateTestCase { transformer = tFactory.newTransformer(); } + transformer.setErrorListener(new ErrorListener() { + + public void error(TransformerException exception) throws TransformerException { + throw exception; + } + + public void fatalError(TransformerException exception) throws TransformerException { + throw exception; + } + + public void warning(TransformerException exception) throws TransformerException { + //ignore + } + + }); + //Set up XMLRenderer to render to a DOM DOMResult domResult = new DOMResult(); |