You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jan Dankert (JIRA)" <de...@myfaces.apache.org> on 2006/07/07 13:26:29 UTC

[jira] Created: (MYFACES-1356) While throwing a ServletException, the rootCause should be set

While throwing a ServletException, the rootCause should be set
--------------------------------------------------------------

         Key: MYFACES-1356
         URL: http://issues.apache.org/jira/browse/MYFACES-1356
     Project: MyFaces Core
        Type: Improvement

  Components: General  
    Versions: 1.2.0-SNAPSHOT    
 Environment: All
    Reporter: Jan Dankert



In the class FacesServlet (and maybe more locations) a ServletException is thrown while loosing the RootCause.
The Stacktrace will be broken.

Instead of 
"throw new ServletException(e.getMessage(), e);"

You should use the method "initCause()", f.e.:
ServletException se = new ServletException( e.getMassage );
se.initCause( e );
throw se;

Thanks a lot
Jan Dankert

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1356) While throwing a ServletException, the rootCause should be set

Posted by "Jan Dankert (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1356?page=comments#action_12419692 ] 

Jan Dankert commented on MYFACES-1356:
--------------------------------------

See
http://www.subbu.org/weblogs/main/2005/11/exceptions_with.html
for details.

> While throwing a ServletException, the rootCause should be set
> --------------------------------------------------------------
>
>          Key: MYFACES-1356
>          URL: http://issues.apache.org/jira/browse/MYFACES-1356
>      Project: MyFaces Core
>         Type: Improvement

>   Components: General
>     Versions: 1.2.0-SNAPSHOT
>  Environment: All
>     Reporter: Jan Dankert

>
> In the class FacesServlet (and maybe more locations) a ServletException is thrown while loosing the RootCause.
> The Stacktrace will be broken.
> Instead of 
> "throw new ServletException(e.getMessage(), e);"
> You should use the method "initCause()", f.e.:
> ServletException se = new ServletException( e.getMassage );
> se.initCause( e );
> throw se;
> Thanks a lot
> Jan Dankert

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira