You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2006/04/28 12:41:44 UTC

svn commit: r397851 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java

Author: imario
Date: Fri Apr 28 03:41:28 2006
New Revision: 397851

URL: http://svn.apache.org/viewcvs?rev=397851&view=rev
Log:
revert exception unfolding, you can do it in your error.jsp

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
URL: http://svn.apache.org/viewcvs/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java?rev=397851&r1=397850&r2=397851&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java Fri Apr 28 03:41:28 2006
@@ -417,26 +417,13 @@
         }
         catch (ServletException e)
         {
-        	// imario@apache.org ==> this will get the root exception from the ServletException.
-        	// I'd say its a bug in ServletException not to take the rootCause into account when it generates
-        	// the stacktrace, though this code will workaround it. If there is a rootCause no one is interested
-        	// in the ServletException.
-        	// Now, e.g if it comes to an EvaluationException you'll be able (maybe by creating your own error.jsp)
-        	// to show the real exception. 
-        	Throwable cause = e.getRootCause();
-        	if (cause == null)
-        	{
-        		cause = e;
-        	}
-        	// <==
-        	
         	if (e.getMessage() != null)
             {
-                throw new FacesException(e.getMessage(), cause);
+                throw new FacesException(e.getMessage(), e);
             }
             else
             {
-                throw new FacesException(cause);
+                throw new FacesException(e);
             }
         }
     }