Class IllegalArgumentExceptionAdvisor
java.lang.Object
com.broadleafcommerce.common.error.validation.web.IllegalArgumentExceptionAdvisor
@RestControllerAdvice(annotations=org.springframework.web.bind.annotation.ResponseBody.class)
public class IllegalArgumentExceptionAdvisor
extends Object
Exception advisor with a handler that handles uncaught illegal argument exceptions by logging
 them and returning an error response.
- Author:
- Nick Crum (ncrum)
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ApiError>handleIllegalArgumentException(IllegalArgumentException ex, org.springframework.web.context.request.WebRequest request) Handles uncaught illegal argument exceptions by logging them and returning anApiErrorwith 400 status.protected void
- 
Constructor Details- 
IllegalArgumentExceptionAdvisorpublic IllegalArgumentExceptionAdvisor()
 
- 
- 
Method Details- 
handleIllegalArgumentException@ExceptionHandler(java.lang.IllegalArgumentException.class) public org.springframework.http.ResponseEntity<ApiError> handleIllegalArgumentException(IllegalArgumentException ex, org.springframework.web.context.request.WebRequest request) Handles uncaught illegal argument exceptions by logging them and returning anApiErrorwith 400 status.- Parameters:
- ex- the exception
- request- the web request
- Returns:
- the api error
 
- 
logDebug
 
-