2 Replies Latest reply on May 10, 2007 2:35 AM by Mike Dougherty

    Error reporting

    Mike Dougherty Newbie

      I'm having a bit of trouble figuring out how error reporting is suppose to work. I have an exceptions.xml file to catch exceptions.

       <exception class="java.lang.RuntimeException">
       <redirect view-id="/fatalError.xhtml">
       <message>Unexpected error, please try again</message>
       <endConversation />
       </redirect>
       </exception>
       <exception>
       <redirect view-id="/fatalError.xhtml">
       <message>Unexpected error, please try again</message>
       <endConversation />
       </redirect>
       </exception>
      


      Which seems to work if the Exception is thrown early enough in the page rendering process. However, it does not always seem to catch the exceptions. The best I can figure is that it doesn't work when the page is rendered partially, and then an Exception is encountered. The makes sense because once an HttpServletResponse has been committed you can't then decide to redirect.

      I need to find a way to configure Seam (or maybe it's JSF) when it reports Errors and/or Exceptions. The default, which includes StackTrace, Component Tree, Scoped Variables, etc, is fine while in development. But once the application goes to production (or test) I need to be able to eliminate all that and just print a nice message.

      Where, how can I configure the reporting of exceptions in my application?