Class ValidationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.elasticsearch.client.ValidationException
All Implemented Interfaces:
java.io.Serializable

public class ValidationException
extends java.lang.IllegalArgumentException
Encapsulates an accumulation of validation errors
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    ValidationException()  
  • Method Summary

    Modifier and Type Method Description
    void addValidationError​(java.lang.String error)
    Add a new validation error to the accumulating validation errors
    void addValidationErrors​(ValidationException exception)
    Adds validation errors from an existing ValidationException to the accumulating validation errors
    java.lang.String getMessage()  
    java.util.List<java.lang.String> validationErrors()
    Returns the validation errors accumulated
    static ValidationException withError​(java.lang.String... error)
    Creates ValidationException instance initialized with given error messages.
    static ValidationException withErrors​(java.util.List<java.lang.String> errors)
    Creates ValidationException instance initialized with given error messages.

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait