mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Improve MailSo Imap ResponseException message
This commit is contained in:
parent
864cca6ffd
commit
52dadc46f3
6 changed files with 9 additions and 7 deletions
|
|
@ -16,4 +16,4 @@ namespace MailSo\Imap\Exceptions;
|
|||
* @package Imap
|
||||
* @subpackage Exceptions
|
||||
*/
|
||||
class InvalidResponseException extends \MailSo\Imap\Exceptions\ResponseException {}
|
||||
class InvalidResponseException extends ResponseException {}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ namespace MailSo\Imap\Exceptions;
|
|||
* @package Imap
|
||||
* @subpackage Exceptions
|
||||
*/
|
||||
class LoginBadCredentialsException extends \MailSo\Imap\Exceptions\LoginException {}
|
||||
class LoginBadCredentialsException extends LoginException {}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ namespace MailSo\Imap\Exceptions;
|
|||
* @package Imap
|
||||
* @subpackage Exceptions
|
||||
*/
|
||||
class LoginBadMethodException extends \MailSo\Imap\Exceptions\LoginException {}
|
||||
class LoginBadMethodException extends LoginException {}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@ namespace MailSo\Imap\Exceptions;
|
|||
* @package Imap
|
||||
* @subpackage Exceptions
|
||||
*/
|
||||
class LoginException extends \MailSo\Imap\Exceptions\NegativeResponseException {}
|
||||
class LoginException extends NegativeResponseException {}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace MailSo\Imap\Exceptions;
|
|||
* @package Imap
|
||||
* @subpackage Exceptions
|
||||
*/
|
||||
class NegativeResponseException extends \MailSo\Imap\Exceptions\ResponseException
|
||||
class NegativeResponseException extends ResponseException
|
||||
{
|
||||
|
||||
public function getAlertFromStatus() : string
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@ class ResponseException extends \MailSo\Imap\Exceptions\Exception
|
|||
|
||||
public function __construct(?\MailSo\Imap\ResponseCollection $oResponses = null, string $sMessage = '', int $iCode = 0, ?\Throwable $oPrevious = null)
|
||||
{
|
||||
parent::__construct($sMessage, $iCode, $oPrevious);
|
||||
|
||||
$this->oResponses = $oResponses;
|
||||
if (!$sMessage && $response = $this->GetLastResponse()) {
|
||||
$sMessage = $response->OptionalResponse[0] . ' ' . $response->HumanReadable;
|
||||
}
|
||||
parent::__construct($sMessage, $iCode, $oPrevious);
|
||||
}
|
||||
|
||||
public function GetResponses() : ?\MailSo\Imap\ResponseCollection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue