private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); // If both SEVERE and INCIDENT_ERROR are loggable, just use // INCIDENT ERROR, otherwise just use SEVERE. Level level = LOGGER.isLoggable(INCIDENT_ERROR) && LOGGER.isLoggable(Level.SEVERE) ? INCIDENT_ERROR : Level.SEVERE; if (LOGGER.isLoggable(level)) { LOGGER.log(level, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); if (t.getMessage() != null) { LOGGER.log(level, t.getMessage(), t); } else { LOGGER.log(level, "No associated message", t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); // If both SEVERE and INCIDENT_ERROR are loggable, just use // INCIDENT ERROR, otherwise just use SEVERE. Level level = LOGGER.isLoggable(INCIDENT_ERROR) && LOGGER.isLoggable(Level.SEVERE) ? INCIDENT_ERROR : Level.SEVERE; if (LOGGER.isLoggable(level)) { LOGGER.log(level, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); if (t.getMessage() != null) { LOGGER.log(level, t.getMessage(), t); } else { LOGGER.log(level, "No associated message", t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); // If both SEVERE and INCIDENT_ERROR are loggable, just use // INCIDENT ERROR, otherwise just use SEVERE. Level level = LOGGER.isLoggable(INCIDENT_ERROR) && LOGGER.isLoggable(Level.SEVERE) ? INCIDENT_ERROR : Level.SEVERE; if (LOGGER.isLoggable(level)) { LOGGER.log(level, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); if (t.getMessage() != null) { LOGGER.log(level, t.getMessage(), t); } else { LOGGER.log(level, "No associated message", t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } }
private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } }
private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } }
private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); // If both SEVERE and INCIDENT_ERROR are loggable, just use // INCIDENT ERROR, otherwise just use SEVERE. Level level = LOGGER.isLoggable(INCIDENT_ERROR) && LOGGER.isLoggable(Level.SEVERE) ? INCIDENT_ERROR : Level.SEVERE; if (LOGGER.isLoggable(level)) { LOGGER.log(level, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); if (t.getMessage() != null) { LOGGER.log(level, t.getMessage(), t); } else { LOGGER.log(level, "No associated message", t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { UIComponent c = exceptionContext.getComponent(); boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); Throwable t = exceptionContext.getException(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[] { t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
try { Throwable t = context.getException(); if (isRethrown(t, (context.inBeforePhase() || context.inAfterPhase()))) { handled = event; Throwable unwrapped = getRootCause(t);
try { Throwable t = context.getException(); if (isRethrown(t, (context.inBeforePhase() || context.inAfterPhase()))) { handled = event; Throwable unwrapped = getRootCause(t);
private void log(ExceptionQueuedEventContext exceptionContext) { Throwable t = exceptionContext.getException(); UIComponent c = exceptionContext.getComponent(); if (t instanceof UpdateModelException) { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = ((UpdateModelException)t).getFacesMessage(); LOGGER.log(Level.SEVERE, message.getSummary(), t.getCause()); context.addMessage(c.getClientId(context), message); } else { boolean beforePhase = exceptionContext.inBeforePhase(); boolean afterPhase = exceptionContext.inAfterPhase(); PhaseId phaseId = exceptionContext.getPhaseId(); String key = getLoggingKey(beforePhase, afterPhase); if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, key, new Object[]{t.getClass().getName(), phaseId.toString(), ((c != null) ? c.getClientId(exceptionContext.getContext()) : ""), t.getMessage()}); LOGGER.log(Level.SEVERE, t.getMessage(), t); } } }
try { Throwable t = context.getException(); if (isRethrown(t, (context.inBeforePhase() || context.inAfterPhase()))) { handled = event; Throwable unwrapped = getRootCause(t);