Class InventoryExceptionAdvisor

java.lang.Object
com.broadleafcommerce.inventory.web.exception.InventoryExceptionAdvisor

@RestControllerAdvice(annotations=org.springframework.web.bind.annotation.ResponseBody.class) public class InventoryExceptionAdvisor extends Object
General exception handler registry for handlers not exclusive to a single controller.
Author:
Kelly Tisdell (ktisdell)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils
     
    org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError>
    handleInventoryUnavailable(Exception ex, org.springframework.web.context.request.WebRequest request)
     
    protected org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError>
    handleUndeclaredThrowableException(com.broadleafcommerce.common.extension.reflection.UndeclaredThrowableException e)
    Hook point for handling custom checked errors that get wrapped in UndeclaredThrowableException.
    protected void
    logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated in favor of central logging managed by ExceptionHandlerUtils.
    void
    setExceptionHandlerUtils(com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils exceptionHandlerUtils)
     

    Methods inherited from class java.lang.Object

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

    • InventoryExceptionAdvisor

      public InventoryExceptionAdvisor()
  • Method Details

    • handleInventoryUnavailable

      @ExceptionHandler(InventoryUnavailableException.class) public org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleInventoryUnavailable(Exception ex, org.springframework.web.context.request.WebRequest request)
    • logDebug

      @Deprecated(forRemoval=true) protected void logDebug(Exception ex, org.springframework.web.context.request.WebRequest request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated in favor of central logging managed by ExceptionHandlerUtils.
    • handleUndeclaredThrowableException

      protected org.springframework.http.ResponseEntity<com.broadleafcommerce.common.error.ApiError> handleUndeclaredThrowableException(com.broadleafcommerce.common.extension.reflection.UndeclaredThrowableException e)
      Hook point for handling custom checked errors that get wrapped in UndeclaredThrowableException. By Default This will merely rethrow the error with a log of the cause's message.
    • getExceptionHandlerUtils

      protected com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils getExceptionHandlerUtils()
    • setExceptionHandlerUtils

      @Autowired public void setExceptionHandlerUtils(com.broadleafcommerce.common.error.validation.web.ExceptionHandlerUtils exceptionHandlerUtils)