diff options
author | Jeremias Maerki <jeremias@apache.org> | 2003-03-12 10:48:04 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2003-03-12 10:48:04 +0000 |
commit | d4b3e4ec95c664a1e43bd424bcec04c1693b1684 (patch) | |
tree | d5af8861d34a3349282a6a26f4c94fafd00d7150 /src | |
parent | b00f991794de1287c6cc30a8558b0e9020486aaf (diff) | |
download | xmlgraphics-fop-d4b3e4ec95c664a1e43bd424bcec04c1693b1684.tar.gz xmlgraphics-fop-d4b3e4ec95c664a1e43bd424bcec04c1693b1684.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/apps/Driver.java | 5 |
1 files changed, 5 insertions, 0 deletions
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) { |