Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

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

scott.stark@jboss.org

2007-05-07


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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.