public class ModelException extends Exception
| 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.
|
boolean |
isRelatedTo(ModelElement otherElement)
Returns whether given element is related to this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic 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 boolean isRelatedTo(ModelElement otherElement)
otherElement - some other model elementTentackle - a domain driven enterprise framework