]> git.mxchange.org Git - jcore-utils.git/commitdiff
renamed variable as no shortening takes place here + changed navigation outcome to...
authorRoland Haeder <roland@mxchange.org>
Tue, 12 Apr 2016 15:31:16 +0000 (17:31 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 12 Apr 2016 15:31:16 +0000 (17:31 +0200)
src/org/mxchange/jcoreee/exceptions/CustomExceptionHandler.java

index 3df048bc3ba25732437a965b9cf1d5c148aea68a..856c170c35b972400ac8a0be99d4b936488672c4 100644 (file)
@@ -90,18 +90,18 @@ public class CustomExceptionHandler extends ExceptionHandlerWrapper {
        @Override
        public void handle () throws FacesException {
 
-               final Iterator<ExceptionQueuedEvent> i = this.getUnhandledExceptionQueuedEvents().iterator();
+               final Iterator<ExceptionQueuedEvent> iterator = this.getUnhandledExceptionQueuedEvents().iterator();
 
-               while (i.hasNext()) {
-                       ExceptionQueuedEvent event = i.next();
+               while (iterator.hasNext()) {
+                       ExceptionQueuedEvent event = iterator.next();
                        ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();
 
                        // get the exception from context
                        Throwable t = context.getException();
 
-                       final FacesContext fc = FacesContext.getCurrentInstance();
-                       final Map<String, Object> requestMap = fc.getExternalContext().getRequestMap();
-                       final NavigationHandler nav = fc.getApplication().getNavigationHandler();
+                       final FacesContext facesContext = FacesContext.getCurrentInstance();
+                       final Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
+                       final NavigationHandler nav = facesContext.getApplication().getNavigationHandler();
 
                        //here you do what ever you want with exception
                        try {
@@ -111,14 +111,14 @@ public class CustomExceptionHandler extends ExceptionHandlerWrapper {
 
                                //redirect error page
                                requestMap.put("exceptionMessage", t.getMessage()); //NOI18N
-                               nav.handleNavigation(fc, null, "/error"); //NOI18N
-                               fc.renderResponse();
+                               nav.handleNavigation(facesContext, null, "exception"); //NOI18N
+                               facesContext.renderResponse();
 
                                // remove the comment below if you want to report the error in a jsf error message
                                // @TODO: JsfUtil.addErrorMessage(t.getMessage());
                        } finally {
                                //remove it from queue
-                               i.remove();
+                               iterator.remove();
                        }
                }