error handling

From: "Cima" <ruel(dot)cima(at)facinf(dot)uho(dot)edu(dot)cu>
To: "php" <php-general(at)lists(dot)php(dot)net>
Subject: error handling
Date: 2005-04-13 05:46:24
Message-ID: 003101c53fec$2698d870$f00110ac@doctorado1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi,

im working with php 4 and postgresql 8 and i would like to know how to
handle certain errors generated. in postgresql, i've written a stored
function that selects a record from a table and in case no record is found i
'raise an exception'. fine, now in my php script i call that the stored
function which works properly when there is a record but when the record
doesnt exist, i would like to be able to place my own error message and not
e.g 'fatal error, .....'. how do i capture(in php) the exception i raised
in postgres so that i know the record doesnt exist?

thanx.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David Orme 2005-04-13 12:25:58 Re: SUMMARY - select top N entries from several groups
Previous Message Slavisa Garic 2005-04-13 05:09:03 Re: [PERFORM] Many connections lingering