Re: Using DatabaseExceptionHandler in Struts(urgent)
Thursday, January 6, 2005 09:36 AM
Yes, you have hit upon one of the ugly things about JDBC and SQLExceptions.
You have to parse the vendor specific message strings, in the recursive SQLExceptions (since there can be more than one).
Perhaps look into the Spring Framework (www.springframework.org). It comes with some DAO tools where they do some of this vendor specific parsing for you, and translate SQLExceptions into their own hierarchy of declared exceptions.