From b899cdf028329207848acf931dce59082358c701 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Fri, 23 Jul 2004 18:54:57 +0000 Subject: Allow a null locator in errorText git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197806 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FONode.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/java/org/apache') diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index 16043c00e..c3927f9b6 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -294,7 +294,11 @@ public abstract class FONode { * @return String opening error text */ protected static String errorText(Locator loc) { - return "Error(" + loc.getLineNumber() + "/" + loc.getColumnNumber() + "): "; + if (loc == null) { + return "Error(Unknown location): "; + } else { + return "Error(" + loc.getLineNumber() + "/" + loc.getColumnNumber() + "): "; + } } /** -- cgit v1.2.3