Re: Re: [PEPr] Comment on Networking::GeoIP
| From: | Michael Wallner | Date: | Wed, 16 Jun 2004 12:01:20 +0000 |
| Subject: | Re: Re: [PEPr] Comment on Networking::GeoIP | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30760@lists.php.net to get a copy of this message | ||
Hi David Costa, you wrote:
> Perhaps (If you are really bored :-D) you can tell me how would that
> change on my source for errors handling ? ;)
Oh David :)
try
{
$obj->doSth()->more();
}
catch (Exception $ex)
{
echo "<pre>";
echo $ex;
echo "</pre>";
}
instead of:
$rs = &$obj->doSth();
if (is_a($rs, 'PEAR_Error')) {
die($rs->getMessage());
}
$rs2 = $rs->more();
if (is_a($rs2, 'PEAR_Error')) {
die($rs2->getMessage());
}
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc