Class GlobalExceptionHandler

java.lang.Object
com.oc_p9.patient_service.exception.GlobalExceptionHandler

@RestControllerAdvice public class GlobalExceptionHandler extends Object
  • 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)