Skip to content

Commit 8ba6a2c

Browse files
Remove full DSNs from exception messages
1 parent 24e5cc9 commit 8ba6a2c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tests/Transport/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ConnectionTest extends TestCase
3333
public function testItCannotBeConstructedWithAWrongDsn()
3434
{
3535
$this->expectException(\InvalidArgumentException::class);
36-
$this->expectExceptionMessage('The given AMQP DSN "amqp://:" is invalid.');
36+
$this->expectExceptionMessage('The given AMQP DSN is invalid.');
3737
Connection::fromDsn('amqp://:');
3838
}
3939

Transport/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public static function fromDsn(string $dsn, array $options = [], AmqpFactory $am
180180
if (false === $parsedUrl = parse_url($dsn)) {
181181
// this is a valid URI that parse_url cannot handle when you want to pass all parameters as options
182182
if (!\in_array($dsn, ['amqp://', 'amqps://'])) {
183-
throw new InvalidArgumentException(sprintf('The given AMQP DSN "%s" is invalid.', $dsn));
183+
throw new InvalidArgumentException('The given AMQP DSN is invalid.');
184184
}
185185

186186
$parsedUrl = [];

0 commit comments

Comments
 (0)