org.springframework.web.servlet.mvc.method.annotation.support
Class RequestBodyNotValidException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.web.servlet.mvc.method.annotation.support.RequestBodyNotValidException
All Implemented Interfaces:
Serializable

public class RequestBodyNotValidException
extends RuntimeException

Thrown by RequestResponseBodyMethodProcessor when an @RequestBody argument annotated with @Valid results in validation errors.

Since:
3.1
Author:
Rossen Stoyanchev
See Also:
Serialized Form

Constructor Summary
RequestBodyNotValidException(Errors errors)
           
 
Method Summary
 Errors getErrors()
          Returns an Errors instance with validation errors.
 String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestBodyNotValidException

public RequestBodyNotValidException(Errors errors)
Parameters:
errors - contains the results of validating an @RequestBody argument.
Method Detail

getErrors

public Errors getErrors()
Returns an Errors instance with validation errors.


getMessage

public String getMessage()
Overrides:
getMessage in class Throwable