diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-04-29 22:31:55 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-04-29 22:31:55 -0700 |
commit | 238f5d9b8b9e4819a9909a7403dcbc7bec0dc714 (patch) | |
tree | 883a7f71551876b5161857d73a9f428b3227f3b1 /src/main/java/org/traccar/helper/Log.java | |
parent | 35b902cd59070a7185d99640851b99798a0d1eb7 (diff) | |
download | trackermap-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.tar.gz trackermap-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.tar.bz2 trackermap-server-238f5d9b8b9e4819a9909a7403dcbc7bec0dc714.zip |
Log exception root cause
Diffstat (limited to 'src/main/java/org/traccar/helper/Log.java')
-rw-r--r-- | src/main/java/org/traccar/helper/Log.java | 5 |
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) { |