[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-4050) Improve handling of bad exception handling config

Norman Richards (JIRA) jira-events at lists.jboss.org
Tue Apr 28 13:15:46 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBSEAM-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Richards closed JBSEAM-4050.
-----------------------------------

    Resolution: Duplicate Issue


> Improve handling of bad exception handling config
> -------------------------------------------------
>
>                 Key: JBSEAM-4050
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4050
>             Project: Seam
>          Issue Type: Task
>          Components: Core
>    Affects Versions: 2.1.1.GA
>            Reporter: Matthew Lieder
>            Assignee: Norman Richards
>
> 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">
> 	</exception>
> 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 mailing list