Commit 60643ca51ecf525483ee5e71d2d3f3aa9e525e09
Exists in
master
Merge branch 'master' of git@github.com:demoiselle/framework.git
Showing
2 changed files
with
11 additions
and
1 deletions
Show diff stats
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/AbstractExceptionHandler.java
@@ -80,7 +80,7 @@ public abstract class AbstractExceptionHandler extends ExceptionHandlerWrapper { | @@ -80,7 +80,7 @@ public abstract class AbstractExceptionHandler extends ExceptionHandlerWrapper { | ||
80 | 80 | ||
81 | protected abstract boolean handleException(final Throwable cause, FacesContext facesContext); | 81 | protected abstract boolean handleException(final Throwable cause, FacesContext facesContext); |
82 | 82 | ||
83 | - private Throwable getRoot(final Throwable throwable) { | 83 | + protected Throwable getRoot(final Throwable throwable) { |
84 | Throwable root = throwable; | 84 | Throwable root = throwable; |
85 | 85 | ||
86 | while (root.getCause() != null) { | 86 | while (root.getCause() != null) { |
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/ApplicationExceptionHandler.java
@@ -104,4 +104,14 @@ public class ApplicationExceptionHandler extends AbstractExceptionHandler { | @@ -104,4 +104,14 @@ public class ApplicationExceptionHandler extends AbstractExceptionHandler { | ||
104 | } | 104 | } |
105 | return handled; | 105 | return handled; |
106 | } | 106 | } |
107 | + | ||
108 | + protected Throwable getRoot(final Throwable throwable) { | ||
109 | + Throwable root = throwable; | ||
110 | + | ||
111 | + while (!Exceptions.isApplicationException(root)) { | ||
112 | + root = root.getCause(); | ||
113 | + } | ||
114 | + | ||
115 | + return root; | ||
116 | + } | ||
107 | } | 117 | } |