Page 1 of 1

Another PostgreSQL question

Posted: Wed 19 Nov 2008 17:46
by snorkel
Hi,
Does the Unidac exception handler fully support the error messages PostgreSQL returns?

Please see:
http://www.postgresql.org/docs/8.3/inte ... ields.html

It's important that these error fields be surfaced to the exception handler because they contain critical informaton like the line number the error occured at etc.

Snorkel

Posted: Thu 20 Nov 2008 06:57
by Challenger
For this you can use the InnerError property of the EUniError class which points (for PostgreSQL provider) to the instance of EPgError class. For example:

Code: Select all

   ShowMessage((E.InnerError as EPgError).CallStack)

Posted: Thu 20 Nov 2008 16:05
by snorkel
Challenger wrote:For this you can use the InnerError property of the EUniError class which points (for PostgreSQL provider) to the instance of EPgError class. For example:

Code: Select all

   ShowMessage((E.InnerError as EPgError).CallStack)
Ok, but will it have access to all the PgSQL error fields like line number etc?

Posted: Fri 21 Nov 2008 06:09
by Challenger
Yes.