2 Replies Latest reply on Mar 1, 2007 11:10 AM by synthez84

    exceptions.xml : display exception's information

    synthez84

      Hi,

      I'm looking how to use Seam exception handling with exception.xml, in Seam 1.1.1.
      The redirection seems to be executed, but I know nothing about the exception.


      I've got an actionBean, that throw an exception like

      throw new Exception("Don't worry, just a test...");


      My exceptions.xml is :

      <exceptions>
       <exception>
       <redirect view-id="/generic_error_page.xhtml">Test</redirect>
       <end-conversation/>
       </exception>
      </exceptions>



      My generic_error_page.xhtml :
      <c:if test="${applicationException != null}">
       <p>
       <h:outputText value="#{applicationException.localizedMessage}" />
       </p>
       </c:if>



      When I call my actionBean, Exception is thrown and I'm redirected in generic_error_page.xhtml. But no message in it.

      What should I do to have an error page with all exception's information?

      Thanks in advance




        • 1. Re: exceptions.xml : display exception's information
          synthez84

          Here are my log :


          [Exceptions] reading exceptions.xml
          [MetaMethodBinding] Error processing action expression #{actionBean.doException}: javax.faces.el.EvaluationException: Exception while invoking expression #{actionBean.doException}



          And still no message in html page...

          • 2. Re: exceptions.xml : display exception's information
            synthez84

            I changed my generic_error_page.xhtml to :

            <h:messages styleClass="message"/>


            With that I can see "Test", which was define in exceptions.xml

            But I would like to print the exception message and the stack..

            What should I do? I also tried

            <h:inputTextarea rows="20" cols="100" readonly="true"
             value="#{errorPageActionListener.stackTrace}" />


            but it doesn't display anything :(
            And I 've still got this javax.faces.el.EvaluationException in my log, which doesn't mean a lot for me...