[seam-issues] [JBoss JIRA] Created: (SEAMCATCH-18) Provide exception type mapping (to deal with vendor-specific exception types)

Dan Allen (JIRA) jira-events at lists.jboss.org
Mon Dec 6 01:35:47 EST 2010


Provide exception type mapping (to deal with vendor-specific exception types)
-----------------------------------------------------------------------------

                 Key: SEAMCATCH-18
                 URL: https://jira.jboss.org/browse/SEAMCATCH-18
             Project: Seam Catch
          Issue Type: Feature Request
          Components: Core Implementation
    Affects Versions: Alpha2
            Reporter: Dan Allen
            Assignee: Jason Porter


There are cases when the useful information about an exception is only available in an implementation-specific exception. It would be useful to provide an exception type mapping infrastructure so that implementation-specific exceptions can be mapped to portable exception types.

A classic example is JPA provider exceptions. Hibernate throws a SQLGrammarException in cases where the SQL statement is invalid (has a syntax error or refers to an invalid table/column). However, if you are writing portable JPA code, you cannot catch this exception. Thus, it would be useful to be able to catch an portable exception that represents this vendor-specific exception.

Obviously, the actual mapping in this example would be done in the persistence module. Catch needs to provide some mechanism for an integration to register the mappings, which it will honor when notifying handlers.

It should be noted that this is a very popular feature from Spring. Refer to SessionFactoryUtils for an example of the exception type mapping. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list