Permalink
Browse files

propagating uncaughtException() up to the parent thread group

  • Loading branch information...
1 parent 46efeab commit 547fd6b1ad2c23bd37a2db5340a75bb047865f2c Bela Ban committed Sep 28, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/org/jgroups/util/Util.java
@@ -35,7 +35,7 @@
/**
* Collection of various utility routines that can not be assigned to other classes.
* @author Bela Ban
- * @version $Id: Util.java,v 1.244 2009/12/18 10:40:28 belaban Exp $
+ * @version $Id: Util.java,v 1.244.2.1 2010/09/28 14:32:40 belaban Exp $
*/
public class Util {
@@ -74,6 +74,10 @@
private static ThreadGroup GLOBAL_GROUP=new ThreadGroup("JGroups") {
public void uncaughtException(Thread t, Throwable e) {
LogFactory.getLog("org.jgroups").error("uncaught exception in " + t + " (thread group=" + GLOBAL_GROUP + " )", e);
+ final ThreadGroup tgParent = getParent();
+ if(tgParent != null) {
+ tgParent.uncaughtException(t,e);
+ }
}
};

0 comments on commit 547fd6b

Please sign in to comment.