Hi, My current plan it to move the ErrorClass to org.h2.api in H2 version 1.4.x. At some later date (once Java 5 is no longer be supported), SQLException sub-classes (SQLIntegrityConstraintViolationException and so on) will be used.
Regards, Thomas On Monday, March 19, 2012, András Péteri wrote: > Thomas, > > Thank you for the response! With respect to the enhancement request in > CDO, a moderate amount of discussion has been going on there, so if you > have some additional time to spend, please go through the comments. Key > points are: > > * The Eclipse Orbit-maintained bundle of h2 (version 1.1.117) exported the > package org.h2.constant; > * SQLIntegrityConstraintViolationException was introduced in Java 6 and > CDO needs to support version 5, so that doesn't help in their case; > * Moving ErrorCode to org.h2.api would create a version dependency which > defeats the original purpose of using it (i.e. keeping compatibility with > earlier versions, including the one in Orbit while handling changes in > error codes automatically); > * The most probable fix at this point is checking for both error codes as > string literals without referring to ErrorCode, as the values themselves > are not expected to change frequently, nor collide with any other state in > future versions. > > (Disclaimer: I'm the reporter of the aforementioned issue, and may not > interpret every notion and comment correctly.) > > On Sat, Mar 17, 2012 at 11:37 AM, Thomas Mueller < > [email protected] <javascript:_e({}, 'cvml', > '[email protected]');>> wrote: > >> Hi, >> >> Sorry for the delay. I see the problem now. The error code was changed >> because originally H2 didn't use the "correct" (as defined by the SQL >> standard) value. There are multiple solutions: >> >> - move the ErrorCode class to org.h2.api >> >> - use SQLIntegrityConstraintViolationException instead of SQLException >> >> Which one would you prefer? Or would it make sense to do both? >> >> Regards, >> Thomas >> >> -- > András > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To post to this group, send email to > [email protected]<javascript:_e({}, 'cvml', > '[email protected]');> > . > To unsubscribe from this group, send email to > [email protected] <javascript:_e({}, 'cvml', > 'h2-database%[email protected]');>. > For more options, visit this group at > http://groups.google.com/group/h2-database?hl=en. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
