error handling

From: Date: Wed, 13 Apr 2005 05:46:24 +0000
Subject: error handling
Groups: php.general 
Request: Send a blank email to php-general+get-212984@lists.php.net to get a copy of this message
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.

« previous php.general (#212984) next »