autoformato de código.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user