]> git.mxchange.org Git - jcoreee.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 18 May 2018 23:58:43 +0000 (01:58 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 18 May 2018 23:58:43 +0000 (01:58 +0200)
- made more local variables final

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcoreee/exceptions/CustomExceptionHandler.java

index 37716a10287f52a7e5d335241fab12487458ad9c..e1f0a1e30a7226a07cf82ffa99f5907c90f827e9 100644 (file)
@@ -93,36 +93,35 @@ public class CustomExceptionHandler extends ExceptionHandlerWrapper {
                final Iterator<ExceptionQueuedEvent> iterator = this.getUnhandledExceptionQueuedEvents().iterator();
 
                while (iterator.hasNext()) {
-                       ExceptionQueuedEvent event = iterator.next();
-                       ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();
+                       final ExceptionQueuedEvent event = iterator.next();
+                       final ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();
 
-                       // get the exception from context
-                       Throwable t = context.getException();
+                       // Get the exception from context
+                       final Throwable t = context.getException();
 
                        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
+                       // Here you do what ever you want with exception
                        try {
-
-                               //log error ?
+                               // Log error ?
                                this.loggerBeanLocal.logFatal("Critical Exception.", t); //NOI18N
 
-                               //redirect error page
+                               // Redirect error page
                                requestMap.put("exceptionMessage", t.getMessage()); //NOI18N
                                nav.handleNavigation(facesContext, null, "exception"); //NOI18N
                                facesContext.renderResponse();
 
-                               // remove the comment below if you want to report the error in a jsf error message
+                               // 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
+                               // Remove it from queue
                                iterator.remove();
                        }
                }
 
-               //parent hanle
+               // Parent hanle
                this.getWrapped().handle();
        }