Re: [PHP4BETA] How to handle Oracle Error Messsages?
| From: | David Munsey-Kano | Date: | Wed, 01 Mar 2000 20:23:54 +0000 |
| Subject: | Re: [PHP4BETA] How to handle Oracle Error Messsages? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11286@lists.php.net to get a copy of this message | ||
I saw OCIError(), and I am checking the return values on my OCI* calls,
but I think what is happening is that the oracle error text message gets
sent to standard output (the web page) before the offending OCI call
returns.
My understanding of OCIError() is that it is used *after* an error has
occured. By then it is too late, because the error message has already
been sent to the page for the user to see.
Am I missing something about how OCIError() works?
Manuel Lemos wrote:
>
> Hello David,
>
> On 01-Mar-00 14:34:18, you wrote:
>
> >I am using the oci* interfaces of php to access Oracle. There are times
> >when I get an ugly oracle error message in my web page, such as when an
> >invalid query was used in a search dialog (I am using ConText).
>
> >How can I trap these error messages and display something friendly and
>
> OCIError() . Make sure ORACLE_HOME environment variable is set to get the
> text for the returned error number.
>
> Regards,
> Manuel Lemos
>
> Web Programming Components using PHP Classes.
> Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
> --
> E-mail: mlemos@acm.org
> URL: http://www.mlemos.e-na.net/
> PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
> --
--
David Munsey-Kano
Dartmouth College
(603) 646-1320
Murphy was a liar, not a lawyer!