aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2010-07-15 06:59:07 +0000
committerJeremias Maerki <jeremias@apache.org>2010-07-15 06:59:07 +0000
commit2226cea00b9cfef0e23d50bcf166326e71547db5 (patch)
tree6ddd712876133dd454d7b0a9eaf9bbcd40d23707 /src
parent16f936559ddeb2c990c3bce55ca3066c01a3e5f9 (diff)
downloadxmlgraphics-fop-2226cea00b9cfef0e23d50bcf166326e71547db5.tar.gz
xmlgraphics-fop-2226cea00b9cfef0e23d50bcf166326e71547db5.zip
Log exception if available to make error localization easier.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@964320 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/events/LoggingEventListener.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/events/LoggingEventListener.java b/src/java/org/apache/fop/events/LoggingEventListener.java
index 03467303e..58fbb7f97 100644
--- a/src/java/org/apache/fop/events/LoggingEventListener.java
+++ b/src/java/org/apache/fop/events/LoggingEventListener.java
@@ -79,10 +79,18 @@ public class LoggingEventListener implements EventListener {
} else if (severity == EventSeverity.WARN) {
log.warn(msg);
} else if (severity == EventSeverity.ERROR) {
- log.error(msg);
+ if (event.getParam("e") != null) {
+ log.error(msg, (Throwable)event.getParam("e"));
+ } else {
+ log.error(msg);
+ }
} else if (severity == EventSeverity.FATAL) {
if (!skipFatal) {
- log.fatal(msg);
+ if (event.getParam("e") != null) {
+ log.fatal(msg, (Throwable)event.getParam("e"));
+ } else {
+ log.fatal(msg);
+ }
}
} else {
assert false;