aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/apps/FOPException.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/apps/FOPException.java')
-rw-r--r--src/java/org/apache/fop/apps/FOPException.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/apps/FOPException.java b/src/java/org/apache/fop/apps/FOPException.java
index 3e1c180e9..851712b09 100644
--- a/src/java/org/apache/fop/apps/FOPException.java
+++ b/src/java/org/apache/fop/apps/FOPException.java
@@ -32,6 +32,8 @@ public class FOPException extends SAXException {
private String systemId;
private int line;
private int column;
+
+ private String localizedMessage;
/**
* Constructs a new FOP exception with the specified detail message.
@@ -210,5 +212,24 @@ public class FOPException extends SAXException {
}
}
}
+
+ /**
+ * Sets the localized message for this exception.
+ * @param msg the localized message
+ */
+ public void setLocalizedMessage(String msg) {
+ this.localizedMessage = msg;
+ }
+
+ /** {@inheritDoc} */
+ public String getLocalizedMessage() {
+ if (this.localizedMessage != null) {
+ return this.localizedMessage;
+ } else {
+ return super.getLocalizedMessage();
+ }
+ }
+
+
}