My program dies in a thread without throwing an exception right in the middle of my code. I tried to install an UncaughtExceptionHandler and capture exception but nothing is caught.
Thread.currentThread().setUncaughtExceptionHandler(new DeathWatcher());
try {
LOG.info("Start =========");
dyingMethod();
LOG.info("End ==========="):
} catch (Throwable e) {
LOG.error(e.getMessage());
throw e;
}
The code will print Start in the log but no End.
What would cause a thread to die before completion without an exception?