Class ValidationAppException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jp.ecuacion.lib.core.exception.checked.AppException
jp.ecuacion.lib.core.exception.checked.SingleAppException
jp.ecuacion.lib.core.exception.checked.ValidationAppException
- All Implemented Interfaces:
Serializable
Holds a Jakarta Validations violation.
Normally ConstraintViolationBeanException should be used Since it's alike
to jakarta validation standard ConstraintViolationException.
But sometimes you can use it
when you want to treat ConstraintViolationBean as one exception
(mainly in libraries or frameworks)
It's not recommended to use in apps from the view of understandability.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescription<T>ValidationAppException(jakarta.validation.ConstraintViolation<T> violation) Constructs a new instance with Jakarta Validation violation.<T>Constructs a new instance withBeanValidationErrorInfoBean. -
Method Summary
Modifier and TypeMethodDescriptionGets BeanValidationErrorInfoBean.String[]Provides the location of an item at which this error occurred.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationAppException
public <T> ValidationAppException(@RequireNonnull jakarta.validation.ConstraintViolation<T> violation) Constructs a new instance with Jakarta Validation violation.- Parameters:
violation- violation result
-
ValidationAppException
Constructs a new instance withBeanValidationErrorInfoBean.- Parameters:
bean- ConstraintViolationBean
-
-
Method Details
-
getConstraintViolationBean
Gets BeanValidationErrorInfoBean.- Returns:
- BeanValidationErrorInfoBean
-
getItemPropertyPaths
Description copied from class:SingleAppExceptionProvides the location of an item at which this error occurred.Its data-type is an array because although standard jakarta validation (like
@NotEmptyhas only one property path, but BizLogicAppException which describes an error of some relation between multiple items may have multiple property paths.- Specified by:
getItemPropertyPathsin classSingleAppException- Returns:
- an array of propertyPath
-