Commit 30964177bccddc36d17cda2544e31e955f4ff3fe
1 parent
d2f1aa22
Exists in
master
Refatoração do tratamento de exceção
Showing
1 changed file
with
1 additions
and
6 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/interceptor/ExceptionHandlerInterceptor.java
... | ... | @@ -171,12 +171,7 @@ public class ExceptionHandlerInterceptor implements Serializable { |
171 | 171 | try { |
172 | 172 | method.invoke(object, param); |
173 | 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 | 177 | method.setAccessible(accessible); | ... | ... |