Subject | Re: How to enable user-friendly error message? |
---|---|
Author | rrokytskyy |
Post date | 2002-07-03T22:38:39Z |
Hi,
Firebird notifies its clients about an errors by sending error code
(in your case this is 335544569). API provides calls to get message
for error code. However, these calls are supposed to be resolved
locally (in native code case this is done in gds32.*). Our driver
contains a mapping between error codes and actual messages
(client-java/src/resources/isc_error_msg.properties). First version
was obtained by simple copy-pasting from Language Reference PDF.
Second version was imported from more or less up to date message
database (it is in CVS) by Ken Richard. If you get message that "No
message for code XXXXX found" this means that error code XXXXX was not
in the message database on 30.4.2002 (date of import). It was either
added later, or is not there at all.
Hope this helps.
Best regards,
Roman Rokytskyy
> I could not figure out on how to show user-friendly error messageYou hardly can do anything here.
> instead of something like
> "
> GDS Exception: org.firebirdsql.gds.GDSException: No message for code
> 335544569 found. No message for code 335544436 found.
> "
Firebird notifies its clients about an errors by sending error code
(in your case this is 335544569). API provides calls to get message
for error code. However, these calls are supposed to be resolved
locally (in native code case this is done in gds32.*). Our driver
contains a mapping between error codes and actual messages
(client-java/src/resources/isc_error_msg.properties). First version
was obtained by simple copy-pasting from Language Reference PDF.
Second version was imported from more or less up to date message
database (it is in CVS) by Ken Richard. If you get message that "No
message for code XXXXX found" this means that error code XXXXX was not
in the message database on 30.4.2002 (date of import). It was either
added later, or is not there at all.
Hope this helps.
Best regards,
Roman Rokytskyy