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
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class AmqpSender implements SenderInterface
try {
$this->connection->publish($encodedMessage['body'], $encodedMessage['headers']);
} 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;