shuber 2004/11/09 18:45:31 CET
Modified files:
core/src/java/org/jahia/bin JahiaErrorDisplay.java
core/src/java/org/jahia/services/applications
ServletDispatchingProvider.java
Log:
Bugfix : removed looping with nested exception in web applications.
Revision Changes Path
1.2 +8 -1 jahia/core/src/java/org/jahia/bin/JahiaErrorDisplay.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/bin/JahiaErrorDisplay.java.diff?r1=1.1&r2=1.2&f=h
1.6 +2 -10
jahia/core/src/java/org/jahia/services/applications/ServletDispatchingProvider.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/services/applications/ServletDispatchingProvider.java.diff?r1=1.5&r2=1.6&f=h
Index: JahiaErrorDisplay.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/bin/JahiaErrorDisplay.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JahiaErrorDisplay.java 30 Mar 2004 14:10:23 -0000 1.1
+++ JahiaErrorDisplay.java 9 Nov 2004 17:45:31 -0000 1.2
@@ -1,4 +1,4 @@
-// $Id: JahiaErrorDisplay.java,v 1.1 2004/03/30 14:10:23 shuber Exp $
+// $Id: JahiaErrorDisplay.java,v 1.2 2004/11/09 17:45:31 shuber Exp $
//
// ____.
// __/\ ______| |__/\. _______
@@ -511,6 +511,13 @@
return newDepth;
}
+ /**
+ * Returns the nested exception if there is one, otherwise returns the
+ * current exception.
+ * @param t Throwable
+ * @return Throwable this method never returns null so don't put it in a
+ * loop !
+ */
public static Throwable getNestedException(Throwable t) {
if (t == null) {
return null;
Index: ServletDispatchingProvider.java
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/java/org/jahia/services/applications/ServletDispatchingProvider.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ServletDispatchingProvider.java 19 Aug 2004 19:12:54 -0000 1.5
+++ ServletDispatchingProvider.java 9 Nov 2004 17:45:31 -0000 1.6
@@ -338,12 +338,8 @@
logger.error ("Error in web application, can't access
application " +
appBean.getName (), se);
Throwable t = se;
- int count = 0;
- while (JahiaErrorDisplay.getNestedException(t) != null) {
- count++;
t = JahiaErrorDisplay.getNestedException(t);
- logger.error("Nested exception " + count, t);
- }
+ logger.error("Nested exception ", t);
return "Error while retrieving application " + appBean.getName();
} catch (IOException ioe) {
logger.error ("Error in web application " +
@@ -353,12 +349,8 @@
logger.error ("Error in web application for app " +
appBean.getName (), t);
Throwable th = t;
- int count = 0;
- while (JahiaErrorDisplay.getNestedException(th) != null) {
- count++;
th = JahiaErrorDisplay.getNestedException(th);
- logger.error("Nested exception " + count, th);
- }
+ logger.error("Nested exception ", th);
return "Error while retrieving application " + appBean.getName();
}