PhaseListener phaseListener = phaseListeners[i];
if (isListenerForThisPhase(phaseListener, phaseId))
{
try
{
phaseListener.beforePhase(new PhaseEvent(facesContext, phaseId, lifecycle));
beforePhaseSuccess[i] = true;
}
catch (Throwable e)
{
beforePhaseSuccess[i] = false; // redundant - for clarity