Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.18

Request #4196 Replace PEAR error system
Submitted: 2005-04-21 13:06 UTC
From: info at adaniels dot nl Assigned:
Status: Bogus Package: PEAR
PHP Version: 5.0.4 OS:
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2005-04-21 13:33 UTC
Package:
Bug Type:
Summary:
From: info at adaniels dot nl
New email:
PHP Version: Package Version: OS:

 

 [2005-04-21 13:06 UTC] info at adaniels dot nl
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) { .... }

Comments

 [2005-04-21 13:08 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-04-21 13:33 UTC] smith at backendmedia dot com
Furthermore PEAR_Error is by no means outdated. Its just an alternate more flexible, less magic error handling mechanism. You have been brainwashed.