com.cgiams.esl.common.exceptions
Class ESLException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.cgiams.esl.common.exceptions.ESLException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FlowProcessorException

public class ESLException
extends java.lang.Exception

Base exception class from which all Environmental Service Line custom Java Exception classes must extend.

Author:
sbowers
See Also:
Serialized Form

Constructor Summary
ESLException()
          Default constructor.
ESLException(java.lang.String as_message)
          Constructor when providing a default message.
ESLException(java.lang.String as_message, java.lang.Throwable ao_exception)
          Constructor for providing an explicit message and a root exception.
ESLException(java.lang.Throwable ao_exception)
          Constructor when providing a root exception.
 
Method Summary
 java.lang.String getFormattedErrorMessage()
          Formats a nice error message which includes both the current exception message(s), the root exception's message, as well as the root exception's stack trace information.
 java.lang.String getMessage()
          Retrieve the message for this exception.
 java.lang.Throwable getRootException()
          Retrieves the root exception for this exception.
 java.lang.String getRootMessage()
          Retrieves the message of the root exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ESLException

public ESLException()
Default constructor.


ESLException

public ESLException(java.lang.String as_message)
Constructor when providing a default message. In this case, this new exception becomes its own Root Exception.

Parameters:
as_message - The message for this exception.

ESLException

public ESLException(java.lang.Throwable ao_exception)
Constructor when providing a root exception.

Parameters:
ao_exception - The root exception.

ESLException

public ESLException(java.lang.String as_message,
                    java.lang.Throwable ao_exception)
Constructor for providing an explicit message and a root exception.

Parameters:
as_message - A default message for this exception.
ao_exception - The root exception.
Method Detail

getRootException

public java.lang.Throwable getRootException()
Retrieves the root exception for this exception.

Returns:
Gets the root exception or null if none is specified.

getMessage

public java.lang.String getMessage()
Retrieve the message for this exception.

Returns:
The current message for this exception, or null if not specified.

getRootMessage

public java.lang.String getRootMessage()
Retrieves the message of the root exception.

Returns:
The message of the root exception.

getFormattedErrorMessage

public java.lang.String getFormattedErrorMessage()
Formats a nice error message which includes both the current exception message(s), the root exception's message, as well as the root exception's stack trace information.

Returns:
A formatted detailed message with information from the current exception and root exception.