added rest exception framework

This commit is contained in:
jomu
2018-01-08 23:54:26 +00:00
parent fdd7b83468
commit efb22b1c46

View File

@ -44,9 +44,9 @@ public class APIExceptionInterceptor {
errorResponse = ((APIException) ex).getHttpResponse();
} else if (ex.getCause() instanceof APIException) {
errorResponse = ((APIException) ex.getCause()).getHttpResponse();
// } else if (ex instanceof ConstraintViolationException) {
} else if (ex instanceof ConstraintViolationException) {
// this exception is handled via the ConstraintViolationMapper
// throw (ConstraintViolationException) ex;
throw (ConstraintViolationException) ex;
} else if (ex.getCause() instanceof ConstraintViolationException) {
// this exception is handled via the ConstraintViolationMapper
throw (ConstraintViolationException) ex.getCause();