Class ExceptionHandlerController


  • @ControllerAdvice
    public class ExceptionHandlerController
    extends java.lang.Object
    Handles exceptions, which could happen during execution one of the method of MVC controllers
    Author:
    Ruslan Nazirov
    • Constructor Detail

      • ExceptionHandlerController

        public ExceptionHandlerController()
    • Method Detail

      • handleException

        @ExceptionHandler(RestException.class)
        @ResponseBody
        public java.util.Map<java.lang.String,​java.lang.Object> handleException​(RestException e)
        Handles REST exception
        Parameters:
        e - REST Exception
        Returns:
        Ajax response with error details