[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4050) Improve handling of bad exception handling config
Matthew Lieder (JIRA)
jira-events at lists.jboss.org
Fri Mar 27 15:17:38 EDT 2009
Improve handling of bad exception handling config
Issue Type: Task
Affects Versions: 2.1.1.GA
Reporter: Matthew Lieder
If you have the following in pages.xml and throw that exception, Seam throws an NPE at org.jboss.seam.exception.Exceptions.parse(Exceptions.java:195):
<exception class="com.example.helloworld.BadParameterException" log="false">
The cause is that while Exceptions.createHandler(...) can return null, Exceptions.parse(...) assumes that it can't. It appears that having an <exception> element without a <redirect> or <http-error> child is invalid (which definitely makes sense, since otherwise Seam would have no idea what to do when the exception happens), but given that it isn't enforced in the XSD and that I could definitely see others making this same mistake I definitely believe that this NPE should be avoided and a more informative error message should be shown (or even an exception upon Seam startup, while parsing pages.xml).
In a Seam vs. Spring Web Flow comparison one of the big knocks against Seam was its cryptic error messages; by filing tickets like this I'm trying to do my part to remedy that :)
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues