Chain new exception with previous one

This commit is contained in:
Eric Masoero 2019-02-25 11:24:06 +01:00
parent 06c84040c4
commit b2b0640d80

View File

@ -45,7 +45,7 @@ class AmqpSender implements SenderInterface
try { try {
$this->connection->publish($encodedMessage['body'], $encodedMessage['headers']); $this->connection->publish($encodedMessage['body'], $encodedMessage['headers']);
} catch (\AMQPException $e) { } catch (\AMQPException $e) {
throw new TransportException('Current transport was not able to send given message, please try again'); throw new TransportException('Current transport was not able to send given message, please try again', 0, $e);
} }
return $envelope; return $envelope;