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

Bug #5322 Clean up docs and handling of exceptions
Submitted: 2005-09-07 14:40 UTC
From: sd at sven-drieling dot de Assigned:
Status: Duplicate Package: PEAR
PHP Version: 5.0.4 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 47 - 24 = ?

 
 [2005-09-07 14:40 UTC] sd at sven-drieling dot de
Description: ------------ Clean up docs and handling of exceptions with PEAR. The PEAR manual does not describe that PEAR_ERROR_EXCEPTION is deprecated. "PEAR_ERROR_EXCEPTION If Zend Engine 2 is present, then an exception will be thrown using the PEAR_Error object." PEAR::setErrorHandling('PEAR_ERROR_EXCEPTION') produces later warnings that PEAR_ERROR_EXCEPTION is obsolete and you should use PEAR_ErrorStack. if ($this->mode & PEAR_ERROR_EXCEPTION) { trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_ErrorStack for exceptions", E_USER_WARNING); But since version PEAR1.3.2, ErrorStack no longer instantiates an exception class. Bug #3990 PEAR_Error PEAR_EXCEPTION broken http://pear.php.net/bugs/bug.php?id=3990 Makes the suggestion to generate PEAR_Exception(). <?php function PEAR_ErrorToPEAR_Exception($err) { if ($err->getCode) { throw new PEAR_Exception($err->getMessage(), $err->getCode(); } throw new PEAR_Exception($err->getMessage()); } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception'); ?> But the PEAR_Exception() API is in alpha state. // $Id: Exception.php,v 1.5 2005/03/28 16:38:58 cellog Exp $ /** * Base PEAR_Exception Class * * WARNING: This code should be considered stable, but the API is * subject to immediate and drastic change, so API stability is * at best alpha

Comments

 [2005-09-07 18:07 UTC] cellog
partial fix is committed
 [2005-09-11 19:07 UTC] cellog
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.