com.karmasphere.share.util
Class ExceptionUtil

java.lang.Object
  extended by com.karmasphere.share.util.ExceptionUtil

public class ExceptionUtil
extends Object


Constructor Summary
ExceptionUtil()
           
 
Method Summary
static void print(Throwable t)
          Prints the stack trace of a Throwable, with all causes.
static void print(Throwable t, PrintStream out)
          Prints the stack trace of a Throwable, with all causes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionUtil

public ExceptionUtil()
Method Detail

print

public static void print(Throwable t,
                         PrintStream out)
Prints the stack trace of a Throwable, with all causes.

The functionality of this method would be obvious if all exceptions conformed to the chained exception standard. However, they don't, so this method special cases the exception types (we know about) which don't return a valid cause from Throwable.getCause().

Some uninteresting exceptions, like InvocationTargetException, are skipped.


print

public static void print(Throwable t)
Prints the stack trace of a Throwable, with all causes. This method is equivalent to print(t, System.err).

See Also:
print(Throwable,PrintStream)


Copyright © 2004-2005 Karamsphere. All Rights Reserved.