Package com.deusto.coffeestack.exception
Class RestExceptionHandler
java.lang.Object
com.deusto.coffeestack.exception.RestExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ApiError> org.springframework.http.ResponseEntity<ApiError> org.springframework.http.ResponseEntity<ApiError> org.springframework.http.ResponseEntity<ApiError> handleValidation(org.springframework.web.bind.MethodArgumentNotValidException ex)
-
Constructor Details
-
RestExceptionHandler
public RestExceptionHandler()
-
-
Method Details
-
handleNotFound
@ExceptionHandler(NotFoundException.class) public org.springframework.http.ResponseEntity<ApiError> handleNotFound(NotFoundException ex) -
handleValidation
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<ApiError> handleValidation(org.springframework.web.bind.MethodArgumentNotValidException ex) -
handleIllegalArgument
@ExceptionHandler(java.lang.IllegalArgumentException.class) public org.springframework.http.ResponseEntity<ApiError> handleIllegalArgument(IllegalArgumentException ex)
-