Class LocationExceptionHandler

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
com.skava.location.web.LocationExceptionHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware

@ControllerAdvice public class LocationExceptionHandler extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
  • Field Summary

    Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.http.ResponseEntity<Object>
    handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException exception, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
    This method is used to create ResponseEntity.
    org.springframework.http.ResponseEntity<Object>
    handleLocationServiceException(com.skava.core.ECommerceException exception, org.springframework.web.context.request.WebRequest request)
    This method is used to create ResponseEntity.
    protected org.springframework.http.ResponseEntity<Object>
    handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException exception, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
    This method is used to create ResponseEntity.

    Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    createProblemDetail, createResponseEntity, getMessageSource, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocationExceptionHandler

      public LocationExceptionHandler()
  • Method Details

    • handleLocationServiceException

      @ExceptionHandler({com.skava.core.validation.ValidateException.class,com.skava.core.ECommerceException.class}) public org.springframework.http.ResponseEntity<Object> handleLocationServiceException(com.skava.core.ECommerceException exception, org.springframework.web.context.request.WebRequest request)
      This method is used to create ResponseEntity.
      Parameters:
      exception - It contains the exception required for the creation of response message.
      request - It contains the attributes required for the creation of response message.
      Returns:
      It returns the ResponseEntity.
    • handleMethodArgumentNotValid

      protected org.springframework.http.ResponseEntity<Object> handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException exception, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
      This method is used to create ResponseEntity.
      Overrides:
      handleMethodArgumentNotValid in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
      Parameters:
      exception - It contains the exception required for the creation of response message.
      headers - It contains the attributes required for the creation of response message.
      status - It contains the attributes required for the creation of response message.
      request - It contains the attributes required for the creation of response message.
      Returns:
      It returns the ResponseEntity.
    • handleHttpMessageNotReadable

      protected org.springframework.http.ResponseEntity<Object> handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException exception, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
      This method is used to create ResponseEntity.
      Overrides:
      handleHttpMessageNotReadable in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
      Parameters:
      exception - It contains the exception required for the creation of response message.
      headers - It contains the attributes required for the creation of response message.
      status - It contains the attributes required for the creation of response message.
      request - It contains the attributes required for the creation of response message.
      Returns:
      It returns the ResponseEntity.