KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > lang > TCThreadGroup


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.lang;
5
6
7 public class TCThreadGroup extends ThreadGroup JavaDoc {
8
9   private final ThrowableHandler throwableHandler;
10
11   public TCThreadGroup(ThrowableHandler throwableHandler) {
12     this(throwableHandler, "TC Thread Group");
13   }
14
15   public TCThreadGroup(ThrowableHandler throwableHandler, String JavaDoc name) {
16     super(name);
17     this.throwableHandler = throwableHandler;
18   }
19
20   public void uncaughtException(Thread JavaDoc thread, Throwable JavaDoc throwable) {
21     try {
22       super.uncaughtException(thread, throwable);
23     } finally {
24       throwableHandler.handleThrowable(thread, throwable);
25     }
26   }
27
28 }
29
Popular Tags