|
TPTP 4.6.1 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.eclipse.tptp.logging.events.cbe.EventException
public class EventException
Class representing a EventException which is the base for all
exceptions in the org.eclipse.tptp.logging.events.cbe
package.
The EventException class is a subclass of
java.lang.Exception that provides support for exception
chaining semantics for pre-JDK v1.4 run-times.
It should be noted that this class provides only the exception chaining semantics available in JDK v1.4 which is a subset of new exception functionality introduced in JDK v1.4. Most of the new functionality requires support from the JVM that is not available on earlier run-times.
Exceptions that subclass this exception only need to add the various constructors and inherit everything else from this class.
See the API documentation for java.lang.Throwable in JDK v1.4
for a full description of the exception chaining functionality.
EventException also provides support for localized
(language-specific) messages.
A EventException 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.java.lang.Throwable whose message text will be
displayed along with that of this EventException.
Exception,
Serialized Form| Constructor Summary | |
|---|---|
EventException()
Construct a new EventException with a null detail message
and an uninitialized cause field. |
|
EventException(java.lang.String message)
Construct a new EventException with the specified detail
message and an uninitialized cause field. |
|
EventException(java.lang.String key,
java.lang.String resourceBundleName)
Creates a EventException with a detail message, message
translation information (resource bundle, message key and message
substitutions). |
|
EventException(java.lang.String key,
java.lang.String resourceBundleName,
java.lang.Object[] parameters)
Creates a EventException with a detail message, message
translation information (resource bundle, message key and message
substitutions). |
|
EventException(java.lang.String key,
java.lang.String resourceBundleName,
java.lang.Object[] parameters,
java.lang.Throwable cause)
Creates a EventException with a detail message, message
translation information (resource bundle, message key and message
substitutions) and a nested exception. |
|
EventException(java.lang.String message,
java.lang.Throwable cause)
Construct a new EventException with a null detail message
and a cause field set to the specified Throwable. |
|
EventException(java.lang.Throwable cause)
Construct a new EventException with a null detail message
and a cause field set to the specified Throwable. |
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getCause()
Return the Throwable that is considered the root cause of this EventException. |
java.lang.String |
getKey()
Gets the message key. |
java.lang.String |
getLocalizedMessage()
Gets the text of the exception message, translated into the current locale. |
java.lang.String |
getLocalizedMessage(com.ibm.icu.util.ULocale locale)
Deprecated. As of TPTP V4.2.0, use getMessage() (English) and getLocalizedMessage() (default locale) for exception message localization. |
java.lang.String |
getMessage()
Gets the text of the exception message. |
java.lang.Throwable |
initCause(java.lang.Throwable cause)
Initialize the cause field for this EventException to the
specified value. |
void |
printStackTrace()
Print this EventException and its backtrace to System.err. |
void |
printStackTrace(java.io.PrintStream stream)
Print this EventException and its backtrace to the
specified print stream. |
void |
printStackTrace(java.io.PrintWriter writer)
Print this EventException and its backtrace to the
specified print writer. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EventException()
EventException with a null detail message
and an uninitialized cause field. The cause may subsequently be
initialized via calling the initCause(Throwable) method.
public EventException(java.lang.String message)
EventException with the specified detail
message and an uninitialized cause field. The cause may subsequently be
initialized via calling the initCause(Throwable)method.
message - a detail message. Null is tolerated.
public EventException(java.lang.String key,
java.lang.String resourceBundleName)
EventException with a detail message, message
translation information (resource bundle, message key and message
substitutions).
key - The message key.resourceBundleName - The name of the message ResourceBundle to use.public EventException(java.lang.Throwable cause)
EventException with a null detail message
and a cause field set to the specified Throwable. Subsequent calls to the
initCause(java.lang.Throwable)method on this instance will result in an exception.
The value of the cause field may be retrieved at any time via the getCause() method.
cause - the Throwable that was caught and is considered the root cause
of this exception. Null is tolerated.
public EventException(java.lang.String message,
java.lang.Throwable cause)
EventException with a null detail message
and a cause field set to the specified Throwable. Subsequent calls to the
initCause(java.lang.Throwable)method on this instance will result in an exception.
The value of the cause field may be retrieved at any time via the getCause() method.
message - the detail message. Null is tolerated.cause - the Throwable that was caught and is considered the root cause
of this exception. Null is tolerated.
public EventException(java.lang.String key,
java.lang.String resourceBundleName,
java.lang.Object[] parameters)
EventException with a detail message, message
translation information (resource bundle, message key and message
substitutions).
key - The message key.resourceBundleName - The name of the message ResourceBundle to use.parameters - An array of elements to be inserted into the message.
public EventException(java.lang.String key,
java.lang.String resourceBundleName,
java.lang.Object[] parameters,
java.lang.Throwable cause)
EventException with a detail message, message
translation information (resource bundle, message key and message
substitutions) and a nested exception.
key - The message key.resourceBundleName - The name of the message ResourceBundle to use.parameters - 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()
EventException. Null is returned if the root cause is
nonexistent or unknown. The root cause is the throwable that caused this
EventException to get thrown.
The Throwable that is returned is either the Throwable supplied via one
of the appropriate constructors, or that set via the
initCause(Throwable)method. While it is typically unnecessary
to override this method, a subclass can override it to return a cause set
by some other means, such as a legacy exception chaining infrastructure.
getCause in class java.lang.ThrowableEventException, or null if the cause is
nonexistent or unknown.public java.lang.String getKey()
public java.lang.String getLocalizedMessage()
getLocalizedMessage in class java.lang.Throwablepublic java.lang.String getLocalizedMessage(com.ibm.icu.util.ULocale locale)
getMessage() (English) and getLocalizedMessage() (default locale) for exception message localization.
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.Throwable initCause(java.lang.Throwable cause)
throws java.lang.IllegalStateException,
java.lang.IllegalArgumentException
EventException to the
specified value. The cause is the Throwable that caused this
EventException to get thrown.
This method can be called at most once. It is generally called from within a constructor that takes a Throwable, or immediately after constructing this object with a constructor that does not accept a Throwable. Thus, if a constructor that takes Throwable as a parameter is used to construct this object, it cannot be called at all.
initCause in class java.lang.Throwablecause - the Throwable which caused this EventException
to be thrown. Null is tolerated.
Throwable instance.
java.lang.IllegalStateException - if this EventException was created with a
constructor that specified a cause, or this method has
already been called on this object.
java.lang.IllegalArgumentException - if the specified cause is this EventException.
An exception cannot be its own cause.public void printStackTrace()
EventException and its backtrace to System.err.
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintStream stream)
EventException and its backtrace to the
specified print stream.
printStackTrace in class java.lang.Throwablestream - the PrintStream to use for outputpublic void printStackTrace(java.io.PrintWriter writer)
EventException and its backtrace to the
specified print writer.
printStackTrace in class java.lang.Throwablewriter - the PrintWriter to use for output
|
TPTP 4.6.1 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||