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

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 : 31 + 9 = ?

 
 [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] 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-09-11 19:07 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!