|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.ibm.events.EventsException
public class EventsException
The EventsException
class is the base exception that all Common
Event Infrastructure exceptions should inherit from. This class provides
support for exception chaining semantics and localized (language-specific) messages.
Exceptions that subclass this exception need to add only the various constructors and inherit everything else from this class.
An EventsException
contains the following components:
Objects
which can be inserted into the message text.
These parameters are required only if the message expects them. These
Objects
are processed according to the rules of the
java.text.MessageFormat
class.
Exception
whose message text will be displayed with
the text of this EventsException
.
Constructor Summary | |
---|---|
EventsException()
Constructs a new EventsException with a null detail message
and an uninitialized cause field. |
|
EventsException(java.lang.String message)
Constructs a new EventsException with the specified detail
message and an uninitialized cause field. |
|
EventsException(java.lang.String key,
java.lang.String file,
java.lang.Object[] parms)
Constructs a new EventsException with a detail message and
message translation information (resource bundle, message key and
message substitutions). |
|
EventsException(java.lang.String key,
java.lang.String file,
java.lang.Object[] parms,
java.lang.Throwable cause)
Constructs a new EventsException with a detail message,
message translation information (resource bundle, message key and
message substitutions), and a nested exception. |
|
EventsException(java.lang.String message,
java.lang.Throwable cause)
Constructs a new EventsException with a null detail message
and a cause field set to the specified
java.lang.Throwable . |
|
EventsException(java.lang.Throwable cause)
Constructs a new EventsException with a null detail message
and a cause field set to the specified
java.lang.Throwable . |
Method Summary | |
---|---|
java.lang.Throwable |
getCause()
Returns the java.lang.Throwable that is considered to be the root
cause of this EventsException . |
java.lang.String |
getFile()
Gets the message file. |
java.lang.String |
getKey()
Gets the message key. |
java.lang.String |
getLocalizedMessage()
Gets the text of the exception message, which is translated into the current locale. |
java.lang.String |
getLocalizedMessage(java.util.Locale locale)
Gets the text of the exception message, which is translated into the specified locale. |
java.lang.String |
getMessage()
Gets the text of the exception message. |
java.lang.Object[] |
getParms()
Gets the message parameters. |
java.lang.Throwable |
initCause(java.lang.Throwable cause)
Initializes the cause field for this EventsException to the
specified value. |
void |
printStackTrace()
Prints this EventsException and its backtrace to System.err. |
void |
printStackTrace(java.io.PrintStream stream)
Prints this EventsException and its backtrace to the
specified java.io.PrintStream . |
void |
printStackTrace(java.io.PrintWriter writer)
Prints this EventsException and its backtrace to the
specified java.io.PrintWriter . |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventsException()
EventsException
with a null detail message
and an uninitialized cause field. The cause can subsequently be
initialized using a call to the initCause(java.lang.Throwable)
method.
public EventsException(java.lang.String message)
EventsException
with the specified detail
message and an uninitialized cause field. The cause can subsequently be
initialized using a call to the initCause(java.lang.Throwable)
method.
message
- The detail message. This value can be null
.public EventsException(java.lang.Throwable cause)
EventsException
with a null detail message
and a cause field set to the specified
java.lang.Throwable
. Subsequent calls to the initCause(java.lang.Throwable)
method on this instance will result in an exception. The
value of the cause field can be retrieved at any time using the getCause()
method.
cause
- The nested exception or null
if a nested
exception is not appropriate.public EventsException(java.lang.String message, java.lang.Throwable cause)
EventsException
with a null detail message
and a cause field set to the specified
java.lang.Throwable
. Subsequent calls to the initCause(java.lang.Throwable)
method on this instance will result in an exception. The
value of the cause field can be retrieved at any time using the getCause()
method.
message
- The detail message. This value can be null
.cause
- The nested exception or null
if a nested
exception is not appropriate.public EventsException(java.lang.String key, java.lang.String file, java.lang.Object[] parms)
EventsException
with a detail message and
message translation information (resource bundle, message key and
message substitutions).
key
- The message key.file
- The name of the message file to use.parms
- An array of elements to be inserted into the message.public EventsException(java.lang.String key, java.lang.String file, java.lang.Object[] parms, java.lang.Throwable cause)
EventsException
with a detail message,
message translation information (resource bundle, message key and
message substitutions), and a nested exception.
key
- The message key.file
- The name of the message file to use.parms
- An array of elements to be inserted into the message.cause
- The nested exception or null
if a nested
exception is not appropriate.Method Detail |
---|
public java.lang.Throwable getCause()
java.lang.Throwable
that is considered to be the root
cause of this EventsException
. A null
value is
returned if the root cause is nonexistent or unknown. The root cause is
the throwable that caused this EventsException
to get
thrown.
getCause
in class java.lang.Throwable
java.lang.Throwable
that is the cause of this
EventsException
or null
if the cause
is nonexistent or unknown.public java.lang.String getFile()
public java.lang.String getKey()
public java.lang.String getLocalizedMessage()
getLocalizedMessage
in class java.lang.Throwable
public java.lang.String getLocalizedMessage(java.util.Locale locale)
locale
- The locale to use for translation of the exception
message or null
to use the default locale.
public java.lang.String getMessage()
getLocalizedMessage(Locale.ENGLISH)
.
getMessage
in class java.lang.Throwable
public java.lang.Object[] getParms()
public java.lang.Throwable initCause(java.lang.Throwable cause) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
EventsException
to the
specified value. The cause is the java.lang.Throwable
that
caused this EventsException
to get thrown.
initCause
in class java.lang.Throwable
cause
- The nested exception or null
if a nested
exception is not appropriate.
java.lang.Throwable
instance.
java.lang.IllegalStateException
- If this EventsException
was created with a constructor that specified a cause or if
this method has already been called on this object.
java.lang.IllegalArgumentException
- If the specified cause is this
EventsException
. An exception cannot be its own
cause.public void printStackTrace()
EventsException
and its backtrace to System.err.
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream stream)
EventsException
and its backtrace to the
specified java.io.PrintStream
.
printStackTrace
in class java.lang.Throwable
stream
- The java.io.PrintStream
to use for outputpublic void printStackTrace(java.io.PrintWriter writer)
EventsException
and its backtrace to the
specified java.io.PrintWriter
.
printStackTrace
in class java.lang.Throwable
writer
- The java.io.PrintWriter
to use for output
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |