Class GlobalExceptionHandler
java.lang.Object
com.oc_p9.patient_service.exception.GlobalExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String>
org.springframework.http.ResponseEntity<String>
org.springframework.http.ResponseEntity<String>
handleValidation
(org.springframework.web.bind.MethodArgumentNotValidException ex)
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
handlePatientNotFound
@ExceptionHandler(PatientNotFoundException.class) public org.springframework.http.ResponseEntity<String> handlePatientNotFound(PatientNotFoundException ex) -
handleValidation
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<String> handleValidation(org.springframework.web.bind.MethodArgumentNotValidException ex) -
handleGeneric
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<String> handleGeneric(Exception ex)
-