Class RestErrorHandler
java.lang.Object
de.knightsoftnet.gwtp.spring.server.controller.RestErrorHandler
This error handler handles validation errors.
- Author:
- Manfred Tremmel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprocessValidationError(org.springframework.web.bind.MethodArgumentNotValidException pexception) handle validation errors.
-
Constructor Details
-
RestErrorHandler
public RestErrorHandler()
-
-
Method Details
-
processValidationError
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public ValidationResultInterface processValidationError(org.springframework.web.bind.MethodArgumentNotValidException pexception) handle validation errors.- Parameters:
pexception- exception which is thrown when data is invalid.- Returns:
- ValidationResultData with validation errors
-