Subject Re: Symbolic constants for Firebird Error Codes
Author zzzento
--- In IBObjects@yahoogroups.com, "mspencewasunavailable"
<firebird@...> wrote:
>
> Are there symbolic constants defined anywhere for the error codes
> returned by FB? I'm guessing that these seldom change, maybe
never,
> but I'm still a little uneasy about writing 335544345 when I
> mean "lock_conflict". What's standard practice for doing this in
> Delphi?
>
> Michael D. Spence
> Mockingbird Data Systems, Inc.
>

They are defined in IB_Header.pas. Then, you can code something like:

.
.
.
on E: Exception do
begin
{ If Key violation... }
if (E is EIBO_ISCError)
and (EIBO_ISCError(E).ERRCODE =
isc_unique_key_violation) then
begin
.
.
.