From f3ed16486e35d81de0e589531b91315a2009c7f8 Mon Sep 17 00:00:00 2001 From: William Victor Mote Date: Thu, 25 Sep 2003 18:42:20 +0000 Subject: [PATCH] port maintenance branch improvements in apps/FOPException to the trunk git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196937 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/apps/FOPException.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/java/org/apache/fop/apps/FOPException.java b/src/java/org/apache/fop/apps/FOPException.java index fed3b9d5c..99d008f29 100644 --- a/src/java/org/apache/fop/apps/FOPException.java +++ b/src/java/org/apache/fop/apps/FOPException.java @@ -60,6 +60,9 @@ public class FOPException extends Exception { private static final String EXCEPTION_SEPARATOR = "\n---------\n"; private Throwable exception; + private String systemId; + private int line; + private int column; /** * create a new FOP Exception @@ -70,6 +73,13 @@ public class FOPException extends Exception { super(message); } + public FOPException(String message, String systemId, int line, int column) { + super(message); + this.systemId = systemId; + this.line = line; + this.column = column; + } + /** * * @param e Throwable object @@ -105,6 +115,16 @@ public class FOPException extends Exception { return exception; } + public void setLocation(String systemId, int line, int column) { + this.systemId = systemId; + this.line = line; + this.column = column; + } + + public boolean isLocationSet() { + return line>=0; + } + /** * Attempts to recast the exception as other Throwable types. * @return the exception recast as another type if possible, otherwise null. -- 2.39.5