Skip to content

Commit 50b4ea1

Browse files
committed
Protocol exception handling improved (bad response message added) Webklex#408
1 parent df4f3c3 commit 50b4ea1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
88
### Fixed
99
- Legacy protocol support fixed (object to array conversion) #411
1010
- Header value decoding improved #410
11+
- Protocol exception handling improved (bad response message added) #408
1112

1213
### Added
1314
- NaN

src/Connection/Protocols/ImapProtocol.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,10 @@ public function readResponse(Response $response, string $tag, bool $dontParse =
303303
if ($tokens[0] == 'OK') {
304304
return $lines ?: [true];
305305
} elseif ($tokens[0] == 'NO' || $tokens[0] == 'BAD' || $tokens[0] == 'BYE') {
306-
throw new ImapServerErrorException();
306+
throw new ImapServerErrorException(implode("\n", $tokens));
307307
}
308308

309-
throw new ImapBadRequestException();
309+
throw new ImapBadRequestException(implode("\n", $tokens));
310310
}
311311

312312
/**

0 commit comments

Comments
 (0)