com.infoengine.util
Class IEException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.servlet.jsp.JspException
              extended by com.infoengine.util.IEException
All Implemented Interfaces:
com.infoengine.util.LocalizableMessage, java.io.Serializable
Direct Known Subclasses:
com.infoengine.exception.fatal.IEFatalException

public class IEException
extends javax.servlet.jsp.JspException
implements com.infoengine.util.LocalizableMessage

See Also:
Serialized Form

Field Summary
static java.lang.String GETMESSAGE_LINE_SEPARATOR
           
static java.lang.String TOSTRING_LINE_SEPARATOR
           
 
Constructor Summary
IEException()
          Constructs a Info*Engine exception with no specified detailed message or embedded throwable object.
IEException(java.lang.String s)
          Constructs a Info*Engine exception with a non-localizable detailed message.
IEException(java.lang.String rb, java.lang.String key, java.lang.Object[] params)
          Constructs a Info*Engine exception with a localizable detailed message.
IEException(java.lang.Throwable t)
          Constructs a Info*Engine exception with a throwable.
IEException(java.lang.Throwable t, java.lang.String s)
          Constructs a Info*Engine exception with an embedded Throwable object and non-localizable detailed message.
IEException(java.lang.Throwable t, java.lang.String rb, java.lang.String key, java.lang.Object[] params)
          Constructs a Info*Engine exception with an embedded Throwable object and a localizable detailed message.
 
Method Summary
 java.lang.String getLocalizedMessage()
          Returns the localized message, including nested exception.
 java.lang.String getLocalizedMessage(boolean nested)
          Returns the localized message, optionally including nested exception.
 java.lang.String getLocalizedMessage(java.util.Locale locale)
          Returns the localized message, for the specified locale, including nested exception.
 java.lang.String getLocalizedMessage(java.util.Locale locale, boolean nested)
          Returns the localized message, for the specified locale, optionally including nested exception.
 java.lang.String getmessage()
          Returns the exception message.
 java.lang.String getMessage()
           
static java.lang.String getNestedExceptionString(java.lang.String msg)
          Returns the localized form of a "nested exception is" string.
static java.lang.String getNestedExceptionString(java.lang.String msg, java.util.Locale locale)
          Returns the localized form of a "nested exception is" string.
 java.lang.Throwable getNestedThrowable()
          Returns the embedded throwable object.
 void printStackTrace()
          Prints this IEException and the backtrace of its most deeply nested embedded Throwable to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints this IEException and the backtrace of its most deeply nested embedded Throwable to the specified print stream.
 java.lang.String toString()
          Returns a description of this IEException.
 java.lang.String toString(boolean nested)
          Returns a description of this IEException.
 
Methods inherited from class javax.servlet.jsp.JspException
getRootCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GETMESSAGE_LINE_SEPARATOR

public static java.lang.String GETMESSAGE_LINE_SEPARATOR

TOSTRING_LINE_SEPARATOR

public static java.lang.String TOSTRING_LINE_SEPARATOR
Constructor Detail

IEException

public IEException()
Constructs a Info*Engine exception with no specified detailed message or embedded throwable object.


IEException

public IEException(java.lang.String s)
Constructs a Info*Engine exception with a non-localizable detailed message.

Parameters:
s - the detailed message

IEException

public IEException(java.lang.String rb,
                   java.lang.String key,
                   java.lang.Object[] params)
Constructs a Info*Engine exception with a localizable detailed message.


IEException

public IEException(java.lang.Throwable t)
Constructs a Info*Engine exception with a throwable.

Parameters:
t - the throwable object

IEException

public IEException(java.lang.Throwable t,
                   java.lang.String s)
Constructs a Info*Engine exception with an embedded Throwable object and non-localizable detailed message.

Parameters:
t - the embedded Throwable. It may be null.
s - the detailed message. It may be null.

IEException

public IEException(java.lang.Throwable t,
                   java.lang.String rb,
                   java.lang.String key,
                   java.lang.Object[] params)
Constructs a Info*Engine exception with an embedded Throwable object and a localizable detailed message.

Parameters:
t - the embedded Throwable. It may be null.
rb - the name of the base resource bundle subclass containing the localizable message.
key - the key associated with the localizable message
params - an optional set of objects to be formatted into the localizable message text.
Method Detail

getMessage

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

getmessage

public java.lang.String getmessage()
Returns the exception message.


getLocalizedMessage

public java.lang.String getLocalizedMessage()
Returns the localized message, including nested exception.

Overrides:
getLocalizedMessage in class java.lang.Throwable

getLocalizedMessage

public java.lang.String getLocalizedMessage(boolean nested)
Returns the localized message, optionally including nested exception.

Parameters:
nested - true if nested exceptions should be included in the message.

getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale locale)
Returns the localized message, for the specified locale, including nested exception.

Specified by:
getLocalizedMessage in interface com.infoengine.util.LocalizableMessage
Parameters:
locale - The locale for which to generate the message.

getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale locale,
                                            boolean nested)
Returns the localized message, for the specified locale, optionally including nested exception.

Parameters:
locale - The locale for which to generate the message.
nested - true if nested exceptions should be included in the message.

getNestedThrowable

public java.lang.Throwable getNestedThrowable()
Returns the embedded throwable object.


getNestedExceptionString

public static java.lang.String getNestedExceptionString(java.lang.String msg)
Returns the localized form of a "nested exception is" string. The format of the returned string is based on the last character of the message to which this string will be appended.

Parameters:
msg - The current message.

getNestedExceptionString

public static java.lang.String getNestedExceptionString(java.lang.String msg,
                                                        java.util.Locale locale)
Returns the localized form of a "nested exception is" string. The format of the returned string is based on the last character of the message to which this string will be appended.

Parameters:
msg - The current message.
locale - The locale to use.

printStackTrace

public void printStackTrace()
Prints this IEException and the backtrace of its most deeply nested embedded Throwable to the standard error stream.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints this IEException and the backtrace of its most deeply nested embedded Throwable to the specified print stream.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - The stream on which to print the stack trace.

toString

public java.lang.String toString()
Returns a description of this IEException. The description includes the descriptions of the nested throwable objects that are embedded within this IEException.

Overrides:
toString in class java.lang.Throwable

toString

public java.lang.String toString(boolean nested)
Returns a description of this IEException. The description optionally includes the descriptions of the nested throwable objects that are embedded within this IEException.

Parameters:
nested - true if nested exceptions should be included in the message.