note 114112 deleted from amqpqueue.bind by sobak
| From: | sobak@php.net | Date: | Sun, 04 Dec 2016 07:11:42 +0000 |
| Subject: | note 114112 deleted from amqpqueue.bind by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208008@lists.php.net to get a copy of this message | ||
Note Submitter: christian dot audebert at wanadoo dot fr
----
don't forget to enclose $queue->bind(string $exchange_name , string $routing_key )
in a try/catch block.
like this
try{
$queue->bind('edi:file:atraiter', 'new');
} catch (Exception $e) {
echo 'Exception reçue : ', $e->getMessage(), "\n";
unset($queue);
}
// personnaly, i unset the $queue in catch and test it after to continue or not..
if (isset($queue)) ....