Package ch.tocco.nice2.model.entity.api
Class ModelException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.tocco.nice2.model.entity.api.BaseRuntimeException
ch.tocco.nice2.model.entity.api.ModelException
- All Implemented Interfaces:
Serializable
Persist exception thrown when the model had an error.
The cause is mostly a misconfiguration in a deployment or while developing. This should not occur in a well tested deployment, and thus logging of the error is advised.
An example is reading a value for a field of an entity that does not exist (in the current installation).
- See Also:
-
Constructor Summary
ConstructorDescriptionModelException
(String message) ModelException
(String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelException
unknownEntity
(String entityName) static ModelException
unknownEntity
(String entityName, Throwable cause) static ModelException
unknownField
(String entityName, String fieldName) static ModelException
unknownField
(String entityName, String fieldName, Throwable cause) static ModelException
unknownRelation
(String entityName, String relationName) static ModelException
unknownRelation
(String entityName, String relationName, Throwable cause) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ModelException
-
ModelException
-
-
Method Details
-
unknownEntity
-
unknownEntity
-
unknownField
-
unknownField
-
unknownRelation
-
unknownRelation
public static ModelException unknownRelation(String entityName, String relationName, Throwable cause)
-