Subject | Re: How do I get my Firebird exception name or number |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-01-18T10:38:11Z |
Hi,
I know server does not send this information as a separate parameter.
Error code 335544382 means isc_random, and provides only string
message that is sent by the server. The only possible way to extract
your information is to parse SQLException message.
error code for your custom exception. In this case you have to parse
message.
Hope this helps.
Best regards,
Roman Rokytskyy
> I set up different exception in by database, and they sometimesI afraid you cannot get your exception ID from SQLException. As far as
> occur :)
>
> How do I get their number (ID) or better their names?
>
> While debugging I can see this name and ID in
> org.firebirdsql.jdbc.FBSQLException object when I browse wrapped
> objects (pressing (+) in JBuilder on "next" several times), but when
> I use fe.getErrorCode() method I get number like 335544382...
I know server does not send this information as a separate parameter.
Error code 335544382 means isc_random, and provides only string
message that is sent by the server. The only possible way to extract
your information is to parse SQLException message.
> What id the right way to catch my exceptions and perform differentCheck the error code. However, do not expect that server will return
> actions on different exceptions?
error code for your custom exception. In this case you have to parse
message.
Hope this helps.
Best regards,
Roman Rokytskyy