* @param context The {@link FacesContext}.
* @param throwable The occurred {@link Throwable}.
* @return The {@link UIAjaxExceptionHandler} or <code>null</code>.
*/
protected AjaxExceptionHandler findHandlerComponent(FacesContext context, Throwable throwable) {
AjaxExceptionHandlerVisitCallback visitCallback = new AjaxExceptionHandlerVisitCallback(throwable);
context.getViewRoot().visitTree(VisitContext.createVisitContext(context), visitCallback);
return visitCallback.getHandler();
}