Skip to content

Commit e41dd11

Browse files
committed
Add address to exception message
1 parent 04e622d commit e41dd11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Connection/Streams/ImapStream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ImapStream implements StreamInterface
1919
public function open(string $transport, string $host, int $port, int $timeout, array $options = []): bool
2020
{
2121
$this->stream = @stream_socket_client(
22-
"{$transport}://{$host}:{$port}",
22+
$address = "{$transport}://{$host}:{$port}",
2323
$errno,
2424
$errstr,
2525
$timeout,
@@ -28,7 +28,7 @@ public function open(string $transport, string $host, int $port, int $timeout, a
2828
);
2929

3030
if (! $this->stream) {
31-
throw new ImapConnectionFailedException($errstr, $errno);
31+
throw new ImapConnectionFailedException("Unable to connect to {$address} ({$errstr})", $errno);
3232
}
3333

3434
return true;

0 commit comments

Comments
 (0)