Java: Handle Exceptions from Threads
In this post I want to describe handling exceptions from threads with the ThreadGroup class and the uncaughtExceptionHandler. First we create a Thread which does useful stuff and throws an exception at some time: public class PfostenThread implements Runnable { @Override public void run() { for (int i = 0; i < 1000000; i++) { …