From d4b3e4ec95c664a1e43bd424bcec04c1693b1684 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 12 Mar 2003 10:48:04 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/apps/Driver.java | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- 2.39.5