aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/helper
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 22:31:55 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 22:31:55 -0700
commit238f5d9b8b9e4819a9909a7403dcbc7bec0dc714 (patch)
tree883a7f71551876b5161857d73a9f428b3227f3b1 /src/main/java/org/traccar/helper
parent35b902cd59070a7185d99640851b99798a0d1eb7 (diff)
downloadtraccar-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.tar.gz
traccar-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.tar.bz2
traccar-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.zip
Log exception root cause
Diffstat (limited to 'src/main/java/org/traccar/helper')
-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) {