MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / ExceptionThread2

Class ExceptionThread2

lowlevel/CaptureUncaughtException.java:7–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import java.util.concurrent.*;
6
7class ExceptionThread2 implements Runnable {
8 @Override public void run() {
9 Thread t = Thread.currentThread();
10 System.out.println("run() by " + t.getName());
11 System.out.println(
12 "eh = " + t.getUncaughtExceptionHandler());
13 throw new RuntimeException();
14 }
15}
16
17class MyUncaughtExceptionHandler implements
18Thread.UncaughtExceptionHandler {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected