Req #4196 [NEW]: Replace PEAR error system

From: Date: Thu, 21 Apr 2005 13:06:14 +0000
Subject: Req #4196 [NEW]: Replace PEAR error system
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-4048@lists.php.net to get a copy of this message
From: info at adaniels dot nl Operating system: PHP version: 5.0.4 Package: PEPr Bug Type: Feature/Change Request Bug description: Replace PEAR error system Description: ------------ Pear currently uses a system where any given result may be an PEAR error and should be check before continueing. I believe this is quite outdated, since PHP 5 supports exceptions. Perhaps the use of exceptions can be enabled using a setting in php.ini to maintain backward compability. Reproduce code: --------------- So instead of: $result = a($b); if ($PEAR::isError($result)) { .... } else { $result = g($h); if ($PEAR::isError($result)) { .... } else { .... } } Expected result: ---------------- Much nicer would be: try { a($b); g($h); } catch (PearException $e) { .... } -- Edit bug report at http://pear.php.net/bugs/bug.php?id=4196&edit=1 --

« previous php.pear.webmaster (#4048) next »