Class ValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.polyapi.commons.api.error.PolyApiException
io.polyapi.plugin.error.PolyApiMavenPluginException
io.polyapi.plugin.error.validation.ValidationException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadExclusionException,InexistentFileException,InvalidPortNumberException,InvalidPropertyException,InvalidUUIDException,KeywordUseException,NullOrEmptyValueException,PropertyNotFoundException
Parent class for exceptions thrown for validation purposes. Stores the name of the property being validated and injects it into the message.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationException(String propertyName, String messageTemplate) Constructor that takes the propertyName and a message template and generates the message with them.ValidationException(String propertyName, String messageTemplate, Throwable cause) Constructor that takes the propertyName and a message template and generates the message with them. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationException
Constructor that takes the propertyName and a message template and generates the message with them.- Parameters:
propertyName- The name of the property being validated.messageTemplate- The message template.
-
ValidationException
Constructor that takes the propertyName and a message template and generates the message with them. It also includes the cause of the exception.- Parameters:
propertyName- The name of the property being validated.messageTemplate- The message template.cause- The cause of the exception.
-