net.israfil.micro.util
Class CausedRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.israfil.micro.util.CausedRuntimeException
All Implemented Interfaces:
java.io.Serializable

public class CausedRuntimeException
extends java.lang.RuntimeException

See Also:
Serialized Form

Constructor Summary
CausedRuntimeException()
           
CausedRuntimeException(java.lang.String message)
           
CausedRuntimeException(java.lang.String message, java.lang.Throwable t)
           
CausedRuntimeException(java.lang.Throwable t)
           
 
Method Summary
 java.lang.Throwable getCause()
           
 java.lang.String getMessage()
           
protected static void printCauseStackTrace(CausedRuntimeException original, java.lang.Throwable cause, java.io.PrintStream ps)
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream s)
           
protected static void tryToPrintUnderlyingCause(java.lang.Throwable t, java.io.PrintStream ps)
          Wraps the attempt to recurse if there's a cause using a try/catch, to avoid use of instanceof, since Throwable does not contain a cause or getCause() API in the CLDC.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CausedRuntimeException

public CausedRuntimeException()

CausedRuntimeException

public CausedRuntimeException(java.lang.Throwable t)

CausedRuntimeException

public CausedRuntimeException(java.lang.String message)

CausedRuntimeException

public CausedRuntimeException(java.lang.String message,
                              java.lang.Throwable t)
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getCause

public java.lang.Throwable getCause()
Overrides:
getCause in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Overrides:
printStackTrace in class java.lang.Throwable

tryToPrintUnderlyingCause

protected static void tryToPrintUnderlyingCause(java.lang.Throwable t,
                                                java.io.PrintStream ps)
Wraps the attempt to recurse if there's a cause using a try/catch, to avoid use of instanceof, since Throwable does not contain a cause or getCause() API in the CLDC.


printCauseStackTrace

protected static void printCauseStackTrace(CausedRuntimeException original,
                                           java.lang.Throwable cause,
                                           java.io.PrintStream ps)


Copyright © 2008. All Rights Reserved.