From efb22b1c467a11f514820e3ace2965257f0d76b2 Mon Sep 17 00:00:00 2001 From: jomu Date: Mon, 8 Jan 2018 23:54:26 +0000 Subject: [PATCH] added rest exception framework --- .../shared/jeeutil/restexfw/APIExceptionInterceptor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jeeutil/src/main/java/de/muehlencord/shared/jeeutil/restexfw/APIExceptionInterceptor.java b/jeeutil/src/main/java/de/muehlencord/shared/jeeutil/restexfw/APIExceptionInterceptor.java index 1890ab4..8945e2f 100644 --- a/jeeutil/src/main/java/de/muehlencord/shared/jeeutil/restexfw/APIExceptionInterceptor.java +++ b/jeeutil/src/main/java/de/muehlencord/shared/jeeutil/restexfw/APIExceptionInterceptor.java @@ -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();