On 25-7-2015 14:16, Vlad Khorsun wrote:
> 25.07.2015 14:57, Mark Rotteveel wrote:
>> Up to now Jaybird has always used the Firebird error codes, or specific
>> error messages defined in code.
>>
>> I am currently looking into defining some Jaybird specific error codes,
>> with associated messages and SQL states.
>
>     Are you going to report is using Firebird API ? Are you going to add
> Jaybird specific messages into firebird.msg ?

Jaybird doesn't use firebird.msg, I occasionally export the error 
messages and sqlstates from a Firebird build to the 
isc_error_msg.properties and isc_error_sqlstates.properties of Jaybird 
(and the error code constants to ISCConstants.java). However, the 
Jaybird specific error codes, error messages and sqlstate mapping will 
be within Jaybird itself.

I want to reuse (extend) the existing error message mechanism inside 
Jaybird to obtain the messages and sqlstate mappings from multiple 
sources and that means that I have to avoid collisions.

>> To prevent collisions with
>> future error codes in Firebird, I'd like to know if using codes below
>> 300000000 would be sufficient to prevent collision, or would it be
>> better to follow the same formal rules as used inside Firebird to
>> generate error codes (eg reserve a facility code for Jaybird)?
>
>     I think, facility is what you need.

How would I go about that if none of the errors in that facility are 
defined inside Firebird, and how can I know/calculate the range of error 
codes I can use (a quick glance at the code seems to suggest that each 
facility has 24 bits for error codes)?

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to