org.equanda.util
Class ExceptionGroup

java.lang.Object
  extended by java.lang.ThreadGroup
      extended by org.equanda.util.ExceptionGroup
All Implemented Interfaces:
Thread.UncaughtExceptionHandler

public class ExceptionGroup
extends ThreadGroup

A ThreadGroup which logs all unrecoverable excetions using SaveException in an "errors.txt" log file. Usage : public static void main( final String args[] ) { ThreadGroup exceptionThreadGroup = new ExceptionGroup(); new Thread( exceptionThreadGroup, "Init thread" ) { public void run() { // do your thing here } }.start(); }

Author:
Joachim Van der Auwera

Constructor Summary
ExceptionGroup()
           
 
Method Summary
 void uncaughtException(Thread t, Throwable e)
           
 
Methods inherited from class java.lang.ThreadGroup
activeCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExceptionGroup

public ExceptionGroup()
Method Detail

uncaughtException

public void uncaughtException(Thread t,
                              Throwable e)
Specified by:
uncaughtException in interface Thread.UncaughtExceptionHandler
Overrides:
uncaughtException in class ThreadGroup


Copyright © 2007-2009. All Rights Reserved.