From 34674d6740cd36de32f87fed9b9af06cc85f0411 Mon Sep 17 00:00:00 2001 From: silvio-machado Date: Wed, 11 Dec 2024 17:42:00 -0300 Subject: [PATCH] =?UTF-8?q?Remove=20bloco=20try-catch=20do=20construtor=20?= =?UTF-8?q?para=20permitir=20que=20exce=C3=A7=C3=B5es=20sejam=20propagadas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Adapter/AMQPAdapter.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/Adapter/AMQPAdapter.php b/src/Adapter/AMQPAdapter.php index 1cefbee..7cf4dc3 100644 --- a/src/Adapter/AMQPAdapter.php +++ b/src/Adapter/AMQPAdapter.php @@ -50,19 +50,15 @@ class AMQPAdapter implements AdapterInterface */ public function __construct(ConfigInterface $config) { - try { - $this->config = $config->getConfig(); - $this->logger = $this->prepareLogger($config); - $this->connection = $this->prepareConnection(); - $this->channel = $this->connection->channel(); - $this->setQueues(); - $this->setExchanges(); - } catch (Exception $exception) { - throw new Exception('AMQPAdapter can not be loaded. - Check config settings and/or access to AMQP Server'); - } + $this->config = $config->getConfig(); + $this->logger = $this->prepareLogger($config); + $this->connection = $this->prepareConnection(); + $this->channel = $this->connection->channel(); + $this->setQueues(); + $this->setExchanges(); } + /** * @return PhpAmqpLib\Connection\AMQPStreamConnection */