public class JavaScriptModelException
extends CoreException
This class is not intended to be subclassed by clients. Instances of this class are automatically created by the JavaScript model when problems arise, so there is generally no need for clients to create instances.
IJavaScriptModelStatus
,
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.
Constructor and Description |
---|
JavaScriptModelException(CoreException exception)
Creates a JavaScript model exception for the given
CoreException . |
JavaScriptModelException(java.lang.Throwable e,
int code)
Creates a JavaScript model exception that wrappers the given
Throwable . |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getException()
Returns the underlying
Throwable that caused the failure. |
IJavaScriptModelStatus |
getJavaScriptModelStatus()
Returns the JavaScript model status object for this exception.
|
boolean |
isDoesNotExist()
Returns whether this exception indicates that a JavaScript model element does not
exist.
|
void |
printStackTrace(java.io.PrintStream output)
Prints this exception's stack trace to the given print stream.
|
void |
printStackTrace(java.io.PrintWriter output)
Prints this exception's stack trace to the given print writer.
|
java.lang.String |
toString() |
public JavaScriptModelException(java.lang.Throwable e, int code)
Throwable
.
The exception contains a JavaScript-specific status object with severity
IStatus.ERROR
and the given status code.e
- the Throwable
code
- one of the JavaScript-specific status codes declared in
IJavaScriptModelStatusConstants
IJavaScriptModelStatusConstants
,
org.eclipse.core.runtime.IStatus#ERROR
public JavaScriptModelException(CoreException exception)
CoreException
.
Equivalent to
JavaScriptModelException(exception,IJavaScriptModelStatusConstants.CORE_EXCEPTION
.exception
- the CoreException
public java.lang.Throwable getException()
Throwable
that caused the failure.Throwable
, or null
if the
direct case of the failure was at the JavaScript model layerpublic IJavaScriptModelStatus getJavaScriptModelStatus()
(IJavaScriptModelStatus) getStatus()
.public boolean isDoesNotExist()
IJavaScriptModelStatusConstants.ELEMENT_DOES_NOT_EXIST
or
IJavaScriptModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH
.
This is a convenience method.true
if this exception indicates that a JavaScript model
element does not existIJavaScriptModelStatus.isDoesNotExist()
,
IJavaScriptModelStatusConstants.ELEMENT_DOES_NOT_EXIST
,
IJavaScriptModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH
public void printStackTrace(java.io.PrintStream output)
output
- the print streampublic void printStackTrace(java.io.PrintWriter output)
output
- the print writerpublic java.lang.String toString()
Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.