Dag H. Wanvik wrote:
"Jørgen Løland (JIRA)" <[EMAIL PROTECTED]> writes:
Any thoughts on whether the most appropriate error code for this would be:
* XRE02.C since it is a replication error message with session severity, or
* 0800x (e.g., 08006 - connection failure) since this is a connection error?
08006 seems to be a network client error, wouldn't a new 08004 (the
server is there but rejects the connection for some reason...) be more
in the spirit of existing allocations? But I am OK with XRE02.C, too.
I looked at some other non-"08xxx" which have session severity level
in Derby, but am not sure they give much guidance. Maybe we should
prefer 08004 when reasonble, since this has standard SQL semantics
(not implementation defined). In JDBC 4 this SQLSTATE class has a
defined mapping to SQL(Non)TransientConnectionExceptions, too.
I must admit I feel a bit out on a limb, here, so it someone has any
general guidelines for how to allocate new error codes in Derby, I,
for one, would appreciate it.
I agree; it makes sense to use existing SQL codes whenever possible and
new, custom error codes when the message does not fit anywhere else.
Hence, in this case, 08004 seems to be the better choice.
--
Jørgen Løland