From: Jeremias Maerki Date: Wed, 12 Mar 2003 10:48:04 +0000 (+0000) Subject: Give a good message if the Driver isn't initialized. X-Git-Tag: Alt-Design-integration-base~35 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d4b3e4ec95c664a1e43bd424bcec04c1693b1684;p=xmlgraphics-fop.git Give a good message if the Driver isn't initialized. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196075 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java index c8522bc74..2bcaeb775 100644 --- a/src/java/org/apache/fop/apps/Driver.java +++ b/src/java/org/apache/fop/apps/Driver.java @@ -552,6 +552,11 @@ public class Driver implements LogEnabled { * @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) {