From: William Victor Mote Date: Thu, 25 Sep 2003 18:42:20 +0000 (+0000) Subject: port maintenance branch improvements in apps/FOPException to the trunk X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1075 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f3ed16486e35d81de0e589531b91315a2009c7f8;p=xmlgraphics-fop.git 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 --- 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.