Class RestErrorHandler

java.lang.Object
de.knightsoftnet.gwtp.spring.server.controller.RestErrorHandler

@ControllerAdvice public class RestErrorHandler extends Object
This error handler handles validation errors.
Author:
Manfred Tremmel
  • 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