ex.printStackTrace(pw);
facesContext.getExternalContext().getRequestMap().put("crankErrorException", writer.toString());
}
protected void generateFacesMessages(FacesContext facesContext) {
MessageManager mm = MessageManagerUtils.getCurrentInstance();
addMessages(facesContext, FacesMessage.SEVERITY_INFO, mm.getStatusMessages());
addMessages(facesContext, FacesMessage.SEVERITY_WARN, mm.getWarningMessages());
addMessages(facesContext, FacesMessage.SEVERITY_FATAL, mm.getFatalMessages());
addMessages(facesContext, FacesMessage.SEVERITY_ERROR, mm.getErrorMessages());
}