You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2007/09/01 05:29:25 UTC

Re: svn commit: r571710 - /myfaces/core/branches/1_2_1/api/src/main/java/javax/faces/webapp/_ErrorPageWriter.java

Hi!
> +        //handle JSP-Exceptions - equally long know for swallowing root-causes ;)
> +        if(ex.getClass().getName().equals("javax.servlet.jsp.JspException")) {
> +            initCausePerReflection(ex,"getRootCause");
> +        }
>   
Why do you check against the class name all over?
I think checking if there is a getRootCause else fallback to getCause 
would do it, even for inherited classes then.

In shared.util we have a ExceptionUtils class which do it that way - 
works pretty fine.

Ciao,
Mario


Re: svn commit: r571710 - /myfaces/core/branches/1_2_1/api/src/main/java/javax/faces/webapp/_ErrorPageWriter.java

Posted by Martin Marinschek <ma...@gmail.com>.
I can't access shared right there - but you're right, let's assume
everyone calls this getRootCause.

regards,

Martin

On 9/1/07, Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi!
> > +        //handle JSP-Exceptions - equally long know for swallowing root-causes ;)
> > +        if(ex.getClass().getName().equals("javax.servlet.jsp.JspException")) {
> > +            initCausePerReflection(ex,"getRootCause");
> > +        }
> >
> Why do you check against the class name all over?
> I think checking if there is a getRootCause else fallback to getCause
> would do it, even for inherited classes then.
>
> In shared.util we have a ExceptionUtils class which do it that way -
> works pretty fine.
>
> Ciao,
> Mario
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces