Commit 30964177bccddc36d17cda2544e31e955f4ff3fe

Authored by Cleverson Sacramento
1 parent d2f1aa22
Exists in master

Refatoração do tratamento de exceção

impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/interceptor/ExceptionHandlerInterceptor.java
@@ -171,12 +171,7 @@ public class ExceptionHandlerInterceptor implements Serializable { @@ -171,12 +171,7 @@ public class ExceptionHandlerInterceptor implements Serializable {
171 try { 171 try {
172 method.invoke(object, param); 172 method.invoke(object, param);
173 } catch (InvocationTargetException cause) { 173 } catch (InvocationTargetException cause) {
174 - Throwable targetTrowable = cause.getTargetException();  
175 - if (targetTrowable instanceof Exception) {  
176 - throw (Exception) targetTrowable;  
177 - } else {  
178 - throw new Exception(targetTrowable);  
179 - } 174 + throw new DemoiselleException(cause.getTargetException());
180 } 175 }
181 176
182 method.setAccessible(accessible); 177 method.setAccessible(accessible);