org.erights.e.develop.exception
Class ExceptionMgr

java.lang.Object
  |
  +--org.erights.e.develop.exception.ExceptionMgr

public class ExceptionMgr
extends Object

Untamed:


Field Summary
private static ExceptionNoticer OurNoticer
           
 
Constructor Summary
ExceptionMgr()
          Enabled:
 
Method Summary
static RuntimeException asSafe(Throwable th)
          Enabled: Returns 'th' as a RuntimeException.
static void printStackTrace(Throwable t, PrintWriter out)
          Enabled:
static void reportException(Throwable t)
          Enabled:
static void reportException(Throwable t, String msg)
          Enabled:
static void setExceptionNoticer(ExceptionNoticer noticer)
          Enabled:
static void uncaughtException(Thread t, Throwable e)
          Enabled:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OurNoticer

private static ExceptionNoticer OurNoticer
Constructor Detail

ExceptionMgr

public ExceptionMgr()
Enabled:

Method Detail

asSafe

public static RuntimeException asSafe(Throwable th)
Enabled: Returns 'th' as a RuntimeException.

Wraps 'th' if necessary so that the caller can do a


     throw ExceptionMgr.asSafe(th);
 
without having to declare any new "throws" cases. The caller does the "throw" rather than this construct so that the Java compiler will have better control flow information.

Equivalent to 'ThrowableSugar.backtrace(th, "");'


printStackTrace

public static void printStackTrace(Throwable t,
                                   PrintWriter out)
Enabled:


reportException

public static void reportException(Throwable t)
Enabled:


reportException

public static void reportException(Throwable t,
                                   String msg)
Enabled:


setExceptionNoticer

public static void setExceptionNoticer(ExceptionNoticer noticer)
Enabled:


uncaughtException

public static void uncaughtException(Thread t,
                                     Throwable e)
Enabled:



comments?