FileDocCategorySizeDatePackage
ChainedRuntimeException.javaAPI DocJBoss 4.2.12100Fri Jul 13 20:56:00 BST 2007xpetstore.util

ChainedRuntimeException

public class ChainedRuntimeException extends RuntimeException
Use this class to support chained exceptions in jdk1.3
author
Isabelle Therrien

(Omit source code)

Fields Summary
private Throwable
cause
Constructors Summary
public ChainedRuntimeException()


    //~ Constructors -----------------------------------------------------------

       
    
        super(  );
    
public ChainedRuntimeException(String message)

        super( message );
    
public ChainedRuntimeException(String message, Throwable cause)

        super( message );
        this.cause = cause;
    
public ChainedRuntimeException(Throwable cause)

        super( "no message" );
        this.cause = cause;
    
Methods Summary
public java.lang.ThrowablegetCause()

        return cause;
    
public voidprintStackTrace()

        super.printStackTrace(  );

        if ( cause != null )
        {
            System.err.println( "<---- Caused by:" );
            cause.printStackTrace(  );
            System.err.println( "---->" );
        }
    
public voidprintStackTrace(java.io.PrintStream ps)

        super.printStackTrace( ps );

        if ( cause != null )
        {
            ps.println( "<---- Caused by:" );
            cause.printStackTrace( ps );
            ps.println( "---->" );
        }
    
public voidprintStackTrace(java.io.PrintWriter pw)

        super.printStackTrace( pw );

        if ( cause != null )
        {
            pw.println( "<---- Caused by:" );
            cause.printStackTrace( pw );
            pw.println( "---->" );
        }
    
public java.lang.StringtoString()

        if ( cause == null )
        {
            return super.toString(  );
        }
        else
        {
            return super.toString(  ) + "  <---- Caused by: " + cause.toString(  ) + " ---->";
        }