firebirdsql psql accessing exception string

242 views Asked by At

Upon trapping an exception in PSQL, is there anyway to access the exception number or string? In this block, you have the SQLCODE or the GDSCODE, but where is the exception string?

1

There are 1 answers

1
Bullet-tooth On

All Firebird exceptions store in client library: GDS32.dll or FbClient.dll. So, when Firebird throws exception client library takes SQLCODE, map this code to exception message and show them on client's program. You cann't fetch exception string from your PSQL code. You can fatch only custom exceptions (select * from rdb$exceptions)

I can make a mistake, but it works like I wrote.