From eddcbca24376ba56c3fceae77ab7b0bcf559334f Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Wed, 20 Jun 2012 09:54:55 +0200 Subject: [PATCH] Add info about status code in error logging FEA: ItEr76S04BugFixing --- .../java/org/libreplan/web/error/PageForErrorOnEvent.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/error/PageForErrorOnEvent.java b/libreplan-webapp/src/main/java/org/libreplan/web/error/PageForErrorOnEvent.java index f557e477a..a8762071d 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/error/PageForErrorOnEvent.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/error/PageForErrorOnEvent.java @@ -3,7 +3,7 @@ * * Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e * Desenvolvemento Tecnolóxico de Galicia - * Copyright (C) 2010-2011 Igalia, S.L. + * Copyright (C) 2010-2012 Igalia, S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -57,6 +57,11 @@ public class PageForErrorOnEvent extends GenericForwardComposer { "javax.servlet.error.exception"); String errorMessage = (String) Executions.getCurrent().getAttribute( "javax.servlet.error.message"); + Integer code = (Integer) Executions.getCurrent().getAttribute( + "javax.servlet.error.status_code"); + if (code != null) { + errorMessage += " [Status Code: " + code + "]"; + } LOG.error(errorMessage, exception); }