Subject | Re: Catch Unique index Exception |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-04-29T20:51:22Z |
> Wenn Catching a unique Index Exception like I've done to check forThis code (-803) does not belong to any engine structure we're
> a unique index constraint I've to check 335544349 instead of SQLCode
> - 803.
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.Are you sure that you did not enable logging with -DFBLog4j=true
> How can I avoid printing this Stacktrace
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