aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Main.java')
-rw-r--r--src/org/traccar/Main.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/Main.java b/src/org/traccar/Main.java
index 73b18c139..48f2323ba 100644
--- a/src/org/traccar/Main.java
+++ b/src/org/traccar/Main.java
@@ -120,6 +120,13 @@ public final class Main {
}
}, 0, CLEAN_PERIOD);
+ Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+ @Override
+ public void uncaughtException(Thread t, Throwable e) {
+ LOGGER.error("Thread exception", e);
+ }
+ });
+
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {