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

Class ExceptionThread

lowlevel/ExceptionThread.java:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import java.util.concurrent.*;
7
8public class ExceptionThread implements Runnable {
9 @Override public void run() {
10 throw new RuntimeException();
11 }
12 public static void main(String[] args) {
13 ExecutorService es =
14 Executors.newCachedThreadPool();
15 es.execute(new ExceptionThread());
16 es.shutdown();
17 }
18}
19/* Output:
20___[ Error Output ]___
21Exception in thread "pool-1-thread-1"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected