From: Roland Häder Date: Fri, 18 May 2018 23:58:43 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3b84b587d442340c5cffa108e5fda34fa7b507b0;p=jcoreee.git Continued: - made more local variables final Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcoreee/exceptions/CustomExceptionHandler.java b/src/org/mxchange/jcoreee/exceptions/CustomExceptionHandler.java index 37716a1..e1f0a1e 100644 --- a/src/org/mxchange/jcoreee/exceptions/CustomExceptionHandler.java +++ b/src/org/mxchange/jcoreee/exceptions/CustomExceptionHandler.java @@ -93,36 +93,35 @@ public class CustomExceptionHandler extends ExceptionHandlerWrapper { final Iterator 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 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(); }