Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.runtime
Class CoreException


java.lang.Object
  extended by 

java.lang.Throwable
      extended by 

java.lang.Exception
          extended by 
org.eclipse.core.runtime.CoreException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DebugException, InstallAbortedException, TeamException, ValidateStateException, WorkbenchException

public class CoreException
extends Exception

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.

See Also:
IStatus, Serialized Form

Constructor Summary
CoreException ( IStatus status)
          Creates a new exception with the given status object.
 
Method Summary
  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.
 
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

CoreException

public CoreException(
IStatus status)
Creates a new exception with the given status object. The message of the given status is used as the exception message.

Parameters:
status - the status object to be associated with this exception
Method Detail

getCause

public 
Throwable getCause()
Returns the cause of this exception, or null if none.

Overrides:
getCause in class Throwable
Returns:
the cause for this exception
Since:
3.4

getStatus

public final 
IStatus getStatus()
Returns the status object for this exception.

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.

Returns:
a status object

printStackTrace

public void printStackTrace()
Prints a stack trace out for the exception, and any nested exception that it may have embedded in its Status object.

Overrides:
printStackTrace in class Throwable

printStackTrace

public 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.

Overrides:
printStackTrace in class Throwable
Parameters:
output - the stream to write to

printStackTrace

public 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.

Overrides:
printStackTrace in class Throwable
Parameters:
output - the stream to write to

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire