java.lang.Object
java.lang.Throwable
java.lang.Exception
org.tentackle.model.ModelException
- All Implemented Interfaces:
Serializable
Model parsing exception.
- Author:
- harald
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModelException(String message) Creates a model exception.ModelException(String message, Throwable cause) 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(Collection<ModelError> errors) Creates a model exception from a collection of errors. -
Method Summary
Modifier and TypeMethodDescriptionGets the related model element.booleanisRelatedTo(ModelElement otherElement) Returns whether given element is related to this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
AT_ELEMENT
string prepended to the source location.- See Also:
-
-
Constructor Details
-
ModelException
Creates a model exception.- Parameters:
message- the error messageelement- the related model elementcause- the cause
-
ModelException
Creates a model exception.- Parameters:
message- the error messageelement- the related model element
-
ModelException
Creates a model exception.- Parameters:
message- the error messagecause- the cause
-
ModelException
Creates a model exception.- Parameters:
message- the error message
-
ModelException
Creates a model exception from a collection of errors.- Parameters:
errors- the errors
-
-
Method Details
-
getElement
Gets the related model element.- Returns:
- the element, may be null!
-
getMessage
- Overrides:
getMessagein classThrowable
-
isRelatedTo
Returns whether given element is related to this exception.- Parameters:
otherElement- some other model element- Returns:
- true if related
-