Re: Error conditions
"Geir Ove Grønmo" <[email protected]> Thu, 15 Mar 2007 13:02:44 +0100
| Newsgroups | gmane.text.xml.xtm.tmql |
|---|---|
| Message-ID | <[email protected]> |
On 3/15/07, Lars Marius Garshol <[email protected]> wrote: > > * Robert Barta > > > > Hmmm, that might take the sting out of specifying every detail. So, > > maybe a handful of 'major' error classes. > > I would be less concerned about this. If the right set of classes is > chosen, it needn't cause any problems for implementors. > > It still seems like a waste of time to me, because I can't see that > it achieves anything. But at least it seems like a smaller waste of > time, and one that doesn't cause problems. In the hope that it might be useful for the discussion, the new JDBC 4.0 specification has rearranged the java.sql.SQLException class into two different types of exceptions: - transient exceptions - non-transient exceptions This is a coarse categorization of errors, but it is very helpful when dealing with them in real-life applications as you will know whether it is makes sense to retry the query or not. If the error is non-transient retrying the query just won't work. E.g. syntax errors are considered non-transient errors. Here's an article about it: http://www.onjava.com/lpt/a/6676 -- Geir O.