[jboss-user] [JBoss Seam] - Error reporting

MikeDougherty do-not-reply at jboss.com
Mon May 7 15:32:18 EDT 2007


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043743#4043743

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043743



More information about the jboss-user mailing list