|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55702 AMQP Exception handling
Submitted: 2011-09-15 14:25 UTC Modified: 2021-06-10 15:33 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: peter dot colclough at toolstation dot com Assigned: cmb (profile)
Status: Closed Package: amqp (PECL)
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: peter dot colclough at toolstation dot com
New email:
PHP Version: OS:


 [2011-09-15 14:25 UTC] peter dot colclough at toolstation dot com
AMQPExchangeException, and possibly others, do not supply the error code in $e->code, element. Only as a part of teh actual text message. 
This makes error trapping slightly complex, slow and horrible.

Test script:
						  $this->oProdExchange->declare($sName, $npExchangeType); 
						  			}catch(AMQPExchangeException $e){
   $code = $e->getCode();     // $code = 0... always

Expected result:
If the exchange being used generates a:
[message:protected] => Server channel error: 406, message: PRECONDITION_FAILED...
I would expect:

[code:protected] => 406   Not [code:protected] => 0


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-26 21:02 UTC]
-Package: Unknown/Other Function +Package: amqp
 [2021-06-10 15:33 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-06-10 15:33 UTC]
The amqp bug tracker is now on Github[1].  If this is still an
issue, please report there.

[1] <>
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 16:05:48 2023 UTC