01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest.restart;
05:
06: import java.util.Collection;
07: import java.util.Collections;
08: import java.util.HashSet;
09: import java.util.Set;
10:
11: public class TestThreadGroup extends ThreadGroup {
12:
13: public TestThreadGroup(ThreadGroup parent, String name) {
14: super (parent, name);
15: }
16:
17: private final Set throwables = Collections
18: .synchronizedSet(new HashSet());
19:
20: public void uncaughtException(Thread thread, Throwable throwable) {
21: super .uncaughtException(thread, throwable);
22: throwables.add(throwable);
23: }
24:
25: public Collection getErrors() {
26: return new HashSet(throwables);
27: }
28: }
|