autoformato de código.

This commit is contained in:
Marcos Garcia Nuñez
2019-12-24 17:55:29 +01:00
parent 0e309052ee
commit 3aa63a8cd1

View File

@@ -127,17 +127,16 @@ public class ManagedBeanBase {
String strType = ""; String strType = "";
if (ex.getClass().equals(ViewExpiredException.class)) { if (ex.getClass().equals(ViewExpiredException.class)) {
// Sessión expired // Sessión expirada
strType = "expired"; strType = "expired";
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Su sesión ha caducado", "Su sesión ha caducado, vuelva a logarse en el sistema."); this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Su sesión ha caducado", "Su sesión ha caducado, vuelva a logarse en el sistema.");
} else { } else {
this.addFacesMessage(FacesMessage.SEVERITY_ERROR, "Se ha producido un error inesperado", "Descripción del error: " + ex.getLocalizedMessage()); this.addFacesMessageKeep(FacesMessage.SEVERITY_ERROR, "Se ha producido un error inesperado", "Descripción del error: " + ex.getLocalizedMessage());
} }
try { try {
ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext(); ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext();
ctx.redirect(ctx.getApplicationContextPath() + "/error.xhtml?type=" + strType); ctx.redirect(ctx.getApplicationContextPath() + "/error.xhtml?type=" + strType);
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block