|
Eclipse Platform Release 3.6 |
|||||||||
| 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.core.runtime.CoreException
public class CoreException
A checked exception representing a failure.
Core exceptions contain a status object describing the cause of the exception.
This class can be used without OSGi running.
IStatus,
Serialized Form| Constructor Summary | |
|---|---|
CoreException(IStatus status)
Creates a new exception with the given status object. |
|
| Method Summary | |
|---|---|
java.lang.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(java.io.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(java.io.PrintWriter output)
Prints a stack trace out for the exception, and any nested exception that it may have embedded in its Status object. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CoreException(IStatus status)
status - the status object to be associated with this exception| Method Detail |
|---|
public java.lang.Throwable getCause()
null if none.
getCause in class java.lang.Throwablepublic final IStatus getStatus()
IMPORTANT:
The result must NOT be used for logging, error reporting, or as a method
return value, since that code pattern hides the original stack trace. Instead,
create a new Status with your plug-in ID and this
CoreException, and use that new status for error reporting
or as a method return value. For example, instead of:
yourPlugin.getLog().log(exception.getStatus());
Use:
IStatus result = new Status(exception.getStatus().getSeverity(), pluginId, message, exception);
yourPlugin.getLog().log(result);
public void printStackTrace()
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintStream output)
printStackTrace in class java.lang.Throwableoutput - the stream to write topublic void printStackTrace(java.io.PrintWriter output)
printStackTrace in class java.lang.Throwableoutput - the stream to write to
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.