aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Main.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-15 23:40:30 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-15 23:40:30 +1200
commit089e7262ab9395d0530c375b8f6cfcff35f45798 (patch)
tree28afcdd22f0fdc4d3b5d776851928db169ee5751 /src/org/traccar/Main.java
parent22e360f7dd6ad6ee89896340123f85bd2537714a (diff)
downloadtrackermap-server-089e7262ab9395d0530c375b8f6cfcff35f45798.tar.gz
trackermap-server-089e7262ab9395d0530c375b8f6cfcff35f45798.tar.bz2
trackermap-server-089e7262ab9395d0530c375b8f6cfcff35f45798.zip
Improve service handling
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() {