You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2003/03/12 11:48:04 UTC
cvs commit: xml-fop/src/java/org/apache/fop/apps Driver.java
jeremias 2003/03/12 02:48:04
Modified: src/java/org/apache/fop/apps Driver.java
Log:
Give a good message if the Driver isn't initialized.
Revision Changes Path
1.2 +5 -0 xml-fop/src/java/org/apache/fop/apps/Driver.java
Index: Driver.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/apps/Driver.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Driver.java 11 Mar 2003 13:05:28 -0000 1.1
+++ Driver.java 12 Mar 2003 10:48:04 -0000 1.2
@@ -552,6 +552,11 @@
* @return a content handler for handling the SAX events.
*/
public ContentHandler getContentHandler() {
+ if (treeBuilder == null) {
+ throw new NullPointerException("Driver isn't initialized. "
+ + "You may have to call initialize() first.");
+ }
+
// TODO: - do this stuff in a better way
// PIJ: I guess the structure handler should be created by the renderer.
if (rendererType == RENDER_MIF) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org