@ControllerAdvice
public class GenieExceptionMapper
extends java.lang.Object
Constructor and Description |
---|
GenieExceptionMapper(com.netflix.spectator.api.Registry registry)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
handleConstraintViolation(javax.servlet.http.HttpServletResponse response,
javax.validation.ConstraintViolationException cve)
Handle constraint violation exceptions.
|
void |
handleGenieException(javax.servlet.http.HttpServletResponse response,
GenieException e)
Handle Genie Exceptions.
|
@Autowired public GenieExceptionMapper(com.netflix.spectator.api.Registry registry)
registry
- The metrics registry@ExceptionHandler(value=GenieException.class) public void handleGenieException(javax.servlet.http.HttpServletResponse response, GenieException e) throws java.io.IOException
response
- The HTTP responsee
- The exception to handlejava.io.IOException
- on error in sending error@ExceptionHandler(value=javax.validation.ConstraintViolationException.class) public void handleConstraintViolation(javax.servlet.http.HttpServletResponse response, javax.validation.ConstraintViolationException cve) throws java.io.IOException
response
- The HTTP responsecve
- The exception to handlejava.io.IOException
- on error in sending error