Package org.opensearch.common
Class ValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.opensearch.common.ValidationException
- All Implemented Interfaces:
Serializable
Encapsulates an accumulation of validation errors
- See Also:
- Opensearch.internal:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddValidationError(String error) Add a new validation error to the accumulating validation errorsfinal voidaddValidationErrors(Iterable<String> errors) Add a sequence of validation errors to the accumulating validation errorsfinal StringReturns the validation errors accumulatedMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationException
public ValidationException()
-
-
Method Details
-
addValidationError
Add a new validation error to the accumulating validation errors- Parameters:
error- the error to add
-
addValidationErrors
Add a sequence of validation errors to the accumulating validation errors- Parameters:
errors- the errors to add
-
validationErrors
Returns the validation errors accumulated -
getMessage
- Overrides:
getMessagein classThrowable
-