aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2004-07-23 18:54:57 +0000
committerSimon Pepping <spepping@apache.org>2004-07-23 18:54:57 +0000
commitb899cdf028329207848acf931dce59082358c701 (patch)
treef8e483c8f6b292800a141dd3a6f37586e828ef9a /src/java/org/apache/fop/fo
parentb0edef464f101e79f3a2a7a00be1a6e7866d325d (diff)
downloadxmlgraphics-fop-b899cdf028329207848acf931dce59082358c701.tar.gz
xmlgraphics-fop-b899cdf028329207848acf931dce59082358c701.zip
Allow a null locator in errorText
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/FONode.java6
1 files changed, 5 insertions, 1 deletions
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() + "): ";
+ }
}
/**