com.ibm.commons.util
Class AbstractRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.ibm.commons.util.AbstractRuntimeException
All Implemented Interfaces:
IExceptionEx, java.io.Serializable
Direct Known Subclasses:
NotImplementedException

public class AbstractRuntimeException
extends java.lang.RuntimeException
implements IExceptionEx

Abstract base class for global runtime exceptions. This class is the main class for all the runtime exception. It provides several enhancements to the Java Exception class, by providing message formating with parameters. All its constructors also have a first argument which is the root exception, which is an easy way for implementing the "exception chaining" pattern.

See Also:
Serialized Form

Constructor Summary
AbstractRuntimeException(java.lang.Throwable nextException)
          Create a new exception.
AbstractRuntimeException(java.lang.Throwable nextException, java.lang.String msg, java.lang.Object... params)
          Create a new exception.
 
Method Summary
static java.lang.Throwable getCause(java.lang.Throwable ext)
          Get the exception cause.
static java.lang.Throwable initCause(java.lang.Throwable ext, java.lang.Throwable cause)
          Init the exception cause.
 void printExtraInformation(java.io.PrintWriter err)
          Print some extra information.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractRuntimeException

public AbstractRuntimeException(java.lang.Throwable nextException)
Create a new exception. The exception is not featuring a message

Parameters:
nextException - the cause exception

AbstractRuntimeException

public AbstractRuntimeException(java.lang.Throwable nextException,
                                java.lang.String msg,
                                java.lang.Object... params)
Create a new exception. The message is formatted using the StringUtil.format rules.

Parameters:
nextException - the cause exception
msg - the exception message
Method Detail

initCause

public static java.lang.Throwable initCause(java.lang.Throwable ext,
                                            java.lang.Throwable cause)
Init the exception cause. The message is formatted using the StringUtil.format rules.

Parameters:
nextException - the cause exception
msg - the exception message

getCause

public static java.lang.Throwable getCause(java.lang.Throwable ext)
Get the exception cause. The message is formatted using the StringUtil.format rules.

Parameters:
nextException - the cause exception
msg - the exception message

printExtraInformation

public void printExtraInformation(java.io.PrintWriter err)
Print some extra information.

Specified by:
printExtraInformation in interface IExceptionEx
Parameters:
err -