public class ModelException extends Exception
| Modifier and Type | Field and Description |
|---|---|
static String |
AT_ELEMENT
string prepended to the source location.
|
| Constructor and Description |
|---|
ModelException(Collection<ModelError> errors)
Creates a model exception from a collection of errors.
|
ModelException(String message)
Creates a model exception.
|
ModelException(String message,
ModelElement element)
Creates a model exception.
|
ModelException(String message,
ModelElement element,
Throwable cause)
Creates a model exception.
|
ModelException(String message,
Throwable cause)
Creates a model exception.
|
| Modifier and Type | Method and Description |
|---|---|
ModelElement |
getElement()
Gets the related model element.
|
String |
getMessage() |
boolean |
isRelatedTo(ModelElement otherElement)
Returns whether given element is related to this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final String AT_ELEMENT
public ModelException(String message, ModelElement element, Throwable cause)
message - the error messageelement - the related model elementcause - the causepublic ModelException(String message, ModelElement element)
message - the error messageelement - the related model elementpublic ModelException(String message, Throwable cause)
message - the error messagecause - the causepublic ModelException(String message)
message - the error messagepublic ModelException(Collection<ModelError> errors)
errors - the errorspublic ModelElement getElement()
public String getMessage()
getMessage in class Throwablepublic boolean isRelatedTo(ModelElement otherElement)
otherElement - some other model elementTentackle - distributed, domain- and model-driven