public class CModelException
extends org.eclipse.core.runtime.CoreException
ICModelStatus
,
ICModelStatusConstants
,
Serialized FormConstructor and Description |
---|
CModelException(org.eclipse.core.runtime.CoreException exception)
Creates a C model exception for the given
CoreException . |
CModelException(ICModelStatus status)
Creates a C model exception for the given C-specific status object.
|
CModelException(Throwable e,
int code)
Creates a C model exception that wrappers the given
Throwable . |
Modifier and Type | Method and Description |
---|---|
boolean |
doesNotExist()
Returns whether this exception indicates that a C model element does not
exist.
|
ICModelStatus |
getCModelStatus()
Returns the C model status object for this exception.
|
Throwable |
getException()
Returns the underlying
Throwable that caused the failure. |
String |
toString()
Returns a printable representation of this exception suitable for debugging
purposes only.
|
getCause, getStatus, printStackTrace, printStackTrace, printStackTrace
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace
public CModelException(Throwable e, int code)
Throwable
.
The exception contains a C-specific status object with severity
IStatus.ERROR
and the given status code.e
- the Throwable
code
- one of the C-specific status codes declared in
ICModelStatusConstants
ICModelStatusConstants
,
IStatus.ERROR
public CModelException(org.eclipse.core.runtime.CoreException exception)
CoreException
.
Equivalent to
CModelException(exception,ICModelStatusConstants.CORE_EXCEPTION
.exception
- the CoreException
public CModelException(ICModelStatus status)
status
- the C-specific status objectpublic Throwable getException()
Throwable
that caused the failure.Throwable
, or null
if the
direct case of the failure was at the C model layerpublic ICModelStatus getCModelStatus()
(ICModelStatus) getStatus()
.public boolean doesNotExist()
ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST
.
This is a convenience method.true
if this exception indicates that a C model
element does not existICModelStatus.doesNotExist()
,
ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.