public class CoreException extends Exception
Core exceptions contain a status object describing the cause of the exception.
This class can be used without OSGi running.
IStatus,
Serialized Form| Constructor and Description |
|---|
CoreException(IStatus status)
Creates a new exception with the given status object.
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
Returns the cause of this exception, or
null if none. |
IStatus |
getStatus()
Returns the status object for this exception.
|
void |
printStackTrace()
Prints a stack trace out for the exception, and
any nested exception that it may have embedded in
its Status object.
|
void |
printStackTrace(PrintStream output)
Prints a stack trace out for the exception, and
any nested exception that it may have embedded in
its Status object.
|
void |
printStackTrace(PrintWriter output)
Prints a stack trace out for the exception, and
any nested exception that it may have embedded in
its Status object.
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toStringpublic CoreException(IStatus status)
status - the status object to be associated with this exceptionpublic final IStatus getStatus()
IMPORTANT:
The result must NOT be used to log a CoreException
(e.g., using yourPlugin.getLog().log(status);),
since that code pattern hides the original stacktrace.
Instead, create a new Status with your plug-in ID and
this CoreException, and log that new status.
public void printStackTrace()
printStackTrace in class Throwablepublic void printStackTrace(PrintStream output)
printStackTrace in class Throwableoutput - the stream to write topublic void printStackTrace(PrintWriter output)
printStackTrace in class Throwableoutput - the stream to write to