public class TransformException
extends java.lang.RuntimeException
This exception class wraps an exception that occurs during the execution of the default transformation engine. When the original exception occurs, the corresponding transform execute context is needed.
This exception saves the context and creates an appropriate IStatus object that can be used to report the error in the UI (ErrorDialog). When this exception is created, it is automatically logged.
Constructor and Description |
---|
TransformException(org.eclipse.core.runtime.IStatus status,
java.lang.Throwable cause,
ITransformContext context)
Constructs a new transformation exception with the specified status
record, cause and execution context.
|
TransformException(java.lang.String message,
java.lang.Throwable cause,
ITransformContext context)
Constructs a new transformation exception with the specified detail
message, cause, and transformation context.
|
TransformException(java.lang.Throwable cause,
ITransformContext context)
Constructs a new transformation exception with the specified cause and
execution context.
|
Modifier and Type | Method and Description |
---|---|
ITransformContext |
getContext()
Returns the transformation context for the cause of this throwable
or
null if the context is nonexistent or unknown. |
org.eclipse.core.runtime.IStatus |
getStatus()
Returns the status for this exception.
|
public TransformException(java.lang.Throwable cause, ITransformContext context)
cause
- The cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)context
- The transformation context in which the error occurred.public TransformException(java.lang.String message, java.lang.Throwable cause, ITransformContext context)
Note that the detail message associated with cause
is
not automatically incorporated in this chained runtime exception's
detail message.
message
- The detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).cause
- The cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)context
- The transformation context in which the error occurred.public TransformException(org.eclipse.core.runtime.IStatus status, java.lang.Throwable cause, ITransformContext context)
status
- The status record for the problem cannot be null.cause
- The cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)context
- The transformation context in which the error occurred.public ITransformContext getContext()
null
if the context is nonexistent or unknown.public org.eclipse.core.runtime.IStatus getStatus()