@ControllerAdvice
public class GenieExceptionMapper
extends java.lang.Object
Constructor and Description |
---|
GenieExceptionMapper(io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.http.ResponseEntity<java.lang.Object> |
handleConstraintViolation(javax.validation.ConstraintViolationException cve)
Handle constraint violation exceptions.
|
org.springframework.http.ResponseEntity<java.lang.Object> |
handleGenieCheckedException(GenieCheckedException e)
Handle
GenieCheckedException instances. |
org.springframework.http.ResponseEntity<java.lang.Object> |
handleGenieException(GenieException e)
Handle Genie Exceptions.
|
org.springframework.http.ResponseEntity<java.lang.Object> |
handleGenieRuntimeException(GenieRuntimeException e)
Handle Genie runtime exceptions.
|
org.springframework.http.ResponseEntity<java.lang.Object> |
handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException e)
Handle MethodArgumentNotValid exceptions.
|
@Autowired public GenieExceptionMapper(io.micrometer.core.instrument.MeterRegistry registry)
registry
- The metrics registry@ExceptionHandler(value=GenieException.class) public org.springframework.http.ResponseEntity<java.lang.Object> handleGenieException(GenieException e)
e
- The exception to handleResponseEntity
instance@ExceptionHandler(value=GenieRuntimeException.class) public org.springframework.http.ResponseEntity<java.lang.Object> handleGenieRuntimeException(GenieRuntimeException e)
e
- The Genie exception to handleResponseEntity
with the exception mapped to a HttpStatus
@ExceptionHandler(value=GenieCheckedException.class) public org.springframework.http.ResponseEntity<java.lang.Object> handleGenieCheckedException(GenieCheckedException e)
GenieCheckedException
instances.e
- The exception to mapResponseEntity
with the exception mapped to a HttpStatus
@ExceptionHandler(value=javax.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<java.lang.Object> handleConstraintViolation(javax.validation.ConstraintViolationException cve)
cve
- The exception to handleResponseEntity
instance@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<java.lang.Object> handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException e)
e
- The exception to handleResponseEntity
instance