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?
Asked
Active
Viewed 224 times
2
-
3Looking at http://tracker.firebirdsql.org/browse/CORE-2040 and http://tracker.firebirdsql.org/browse/CORE-3254 this feature doesn't exist yet – Mark Rotteveel Aug 20 '13 at 18:47
1 Answers
0
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.

Bullet-tooth
- 782
- 1
- 10
- 16
-
1Yes, the is the technique I use from client code. This is the way to do it. I tried to fetch the code in PSQL though. The link in the comment above is the correct answer for this (not implemented yet). I would have checked that one if it had been an answer instead of a comment. – jcalfee314 Aug 22 '13 at 12:36