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

Request #18574 Avoid try-catch-rethrow
Submitted: 2011-05-31 15:07 UTC
From: doconnor Assigned: gauthierm
Status: Closed Package: HTTP_OAuth (version 0.2.2)
PHP Version: 5.2.12 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2011-05-31 15:07 UTC] doconnor (Daniel O'Connor)
Description: ------------ Doing: try { $response = $this->getHTTPRequest2()->send(); } catch (Exception $e) { throw new HTTP_OAuth_Exception($e->getMessage(), $e->getCode()); } .... removes 95% of the exception backtrace - avoid it; or look at exception chaining mechanisms.

Comments

 [2011-07-04 08:18 UTC] shupp (Bill Shupp)
Agreed. I think I'd like to just use PHP 5.3's exception chaining. I wonder if making 5.3 a requirement will adversely affect many folks.
 [2013-11-01 19:37 UTC] gauthierm (Michael Gauthier)
-Status: Open +Status: Closed -Assigned To: +Assigned To: gauthierm
This bug has been fixed in SVN. 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. https://github.com/pear/HTTP_OAuth/pull/4 Exception chaining is now used if it is available.