Subject Re: Catch Unique index Exception
Author Roman Rokytskyy
> Wenn Catching a unique Index Exception like I've done to check for
> a unique index constraint I've to check 335544349 instead of SQLCode
> - 803.

This code (-803) does not belong to any engine structure we're
communicating with, you can see it only in message database and
Language Reference document. JDBC specification states that we should
return vendor error code, and those long numbers is exactly the vendor
error code.

A tip: you can check error codes using
org.firebirdsql.gds.ISCConstants.isc_no_dup constant, it is more
meaningful.

> Nevertheless - It works but a Stracktrace is printed.
> How can I avoid printing this Stacktrace

Are you sure that you did not enable logging with -DFBLog4j=true
option? If yes, then this is your code that does this - we do not have
printStackTrace() outside logging library (except gds.Encoding_OneByte
printing UnsupportedEncodingException and ngds.GDS_Impl complaining
when it cannot load library).

Roman