com.infoengine.util
Class IEException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.servlet.jsp.JspException
              extended bycom.infoengine.util.IEException
All Implemented Interfaces:
LocalizableMessage, Serializable
Direct Known Subclasses:
CommandDelegateProviderException, IEAdapterException, IEFatalException, IENoSavedStateException, IEPartialResultsException, IETemporaryException, SocketAccessException

public class IEException
extends javax.servlet.jsp.JspException
implements LocalizableMessage

See Also:
Serialized Form

Field Summary
private  boolean calledOnce
           
static String GETMESSAGE_LINE_SEPARATOR
           
private  IEMessage message
           
private  Throwable nestedThrowable
           
private static String RESOURCE
           
static String TOSTRING_LINE_SEPARATOR
           
 
Fields inherited from class javax.servlet.jsp.JspException
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
IEException()
          Constructs a Info*Engine exception with no specified detailed message or embedded throwable object.
IEException(String s)
          Constructs a Info*Engine exception with a non-localizable detailed message.
IEException(String rb, String key, Object[] params)
          Constructs a Info*Engine exception with a localizable detailed message.
IEException(Throwable t)
          Constructs a Info*Engine exception with a throwable.
IEException(Throwable t, String s)
          Constructs a Info*Engine exception with an embedded Throwable object and non-localizable detailed message.
IEException(Throwable t, String rb, String key, Object[] params)
          Constructs a Info*Engine exception with an embedded Throwable object and a localizable detailed message.
 
Method Summary
 String getLocalizedMessage()
          Returns the localized message, including nested exception.
 String getLocalizedMessage(boolean nested)
          Returns the localized message, optionally including nested exception.
 String getLocalizedMessage(Locale locale)
          Returns the localized message, for the specified locale, including nested exception.
 String getLocalizedMessage(Locale locale, boolean nested)
          Returns the localized message, for the specified locale, optionally including nested exception.
 String getmessage()
          Returns the exception message.
 String getMessage()
           
static String getNestedExceptionString(String msg)
          Returns the localized form of a "nested exception is" string.
static String getNestedExceptionString(String msg, Locale locale)
          Returns the localized form of a "nested exception is" string.
 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(PrintStream s)
          Prints this IEException and the backtrace of its most deeply nested embedded Throwable to the specified print stream.
protected  void setLocalizedMessage(String rb, String key, Object[] params)
          Sets the localized message for this IEException.
 String toString()
          Returns a description of this IEException.
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GETMESSAGE_LINE_SEPARATOR

public static String GETMESSAGE_LINE_SEPARATOR

TOSTRING_LINE_SEPARATOR

public static String TOSTRING_LINE_SEPARATOR

RESOURCE

private static String RESOURCE

nestedThrowable

private Throwable nestedThrowable

message

private IEMessage message

calledOnce

private boolean calledOnce
Constructor Detail

IEException

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


IEException

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

Parameters:
s - the detailed message

IEException

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


IEException

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

Parameters:
t - the throwable object

IEException

public IEException(Throwable t,
                   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(Throwable t,
                   String rb,
                   String key,
                   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 String getMessage()

getmessage

public String getmessage()
Returns the exception message.


getLocalizedMessage

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


getLocalizedMessage

public 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 String getLocalizedMessage(Locale locale)
Returns the localized message, for the specified locale, including nested exception.

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

getLocalizedMessage

public String getLocalizedMessage(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 Throwable getNestedThrowable()
Returns the embedded throwable object.


getNestedExceptionString

public static String getNestedExceptionString(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 String getNestedExceptionString(String msg,
                                              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.


printStackTrace

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

Parameters:
s - The stream on which to print the stack trace.

setLocalizedMessage

protected void setLocalizedMessage(String rb,
                                   String key,
                                   Object[] params)
Sets the localized message for this IEException.

Parameters:
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.
See Also:
ResourceBundle, MessageFormat

toString

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


toString

public 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.