On Wednesday 13 April 2005 08:46, Cima wrote: > 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? Possible scenarios are: 1. Use string parsing to recognise the error message. 2. Upgrade to PHP 5, which is not that good if you need to change a lot of code afterwards. > > > thanx. -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436
Attachment:
pgpm5UBgYdr0Q.pgp
Description: PGP signature