Class GlobalExceptionHandler
java.lang.Object
com.MedilaboSolutions.note.exception.GlobalExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse> handleValidationException
(org.springframework.web.bind.MethodArgumentNotValidException ex)
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
handleResourceNotFoundException
@ExceptionHandler(ResourceNotFoundException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleResourceNotFoundException(ResourceNotFoundException ex) -
handleGeneralException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleGeneralException(Exception ex) -
handleValidationException
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleValidationException(org.springframework.web.bind.MethodArgumentNotValidException ex) -
handleIllegalArgumentException
@ExceptionHandler(java.lang.IllegalArgumentException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleIllegalArgumentException(IllegalArgumentException ex)
-