aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/helper/Log.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/helper/Log.java')
-rw-r--r--src/main/java/org/traccar/helper/Log.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/helper/Log.java b/src/main/java/org/traccar/helper/Log.java
index f328e8ce9..607a0585f 100644
--- a/src/main/java/org/traccar/helper/Log.java
+++ b/src/main/java/org/traccar/helper/Log.java
@@ -211,6 +211,11 @@ public final class Log {
}
public static String exceptionStack(Throwable exception) {
+ Throwable cause;
+ while (null != (cause = exception.getCause()) && (exception != cause) ) {
+ exception = cause;
+ }
+
StringBuilder s = new StringBuilder();
String exceptionMsg = exception.getMessage();
if (exceptionMsg != null) {