mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +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
|
* @package Imap
|
||||||
* @subpackage Exceptions
|
* @subpackage Exceptions
|
||||||
*/
|
*/
|
||||||
class InvalidResponseException extends \MailSo\Imap\Exceptions\ResponseException {}
|
class InvalidResponseException extends ResponseException {}
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@ namespace MailSo\Imap\Exceptions;
|
||||||
* @package Imap
|
* @package Imap
|
||||||
* @subpackage Exceptions
|
* @subpackage Exceptions
|
||||||
*/
|
*/
|
||||||
class LoginBadCredentialsException extends \MailSo\Imap\Exceptions\LoginException {}
|
class LoginBadCredentialsException extends LoginException {}
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@ namespace MailSo\Imap\Exceptions;
|
||||||
* @package Imap
|
* @package Imap
|
||||||
* @subpackage Exceptions
|
* @subpackage Exceptions
|
||||||
*/
|
*/
|
||||||
class LoginBadMethodException extends \MailSo\Imap\Exceptions\LoginException {}
|
class LoginBadMethodException extends LoginException {}
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,4 @@ namespace MailSo\Imap\Exceptions;
|
||||||
* @package Imap
|
* @package Imap
|
||||||
* @subpackage Exceptions
|
* @subpackage Exceptions
|
||||||
*/
|
*/
|
||||||
class LoginException extends \MailSo\Imap\Exceptions\NegativeResponseException {}
|
class LoginException extends NegativeResponseException {}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace MailSo\Imap\Exceptions;
|
||||||
* @package Imap
|
* @package Imap
|
||||||
* @subpackage Exceptions
|
* @subpackage Exceptions
|
||||||
*/
|
*/
|
||||||
class NegativeResponseException extends \MailSo\Imap\Exceptions\ResponseException
|
class NegativeResponseException extends ResponseException
|
||||||
{
|
{
|
||||||
|
|
||||||
public function getAlertFromStatus() : string
|
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)
|
public function __construct(?\MailSo\Imap\ResponseCollection $oResponses = null, string $sMessage = '', int $iCode = 0, ?\Throwable $oPrevious = null)
|
||||||
{
|
{
|
||||||
parent::__construct($sMessage, $iCode, $oPrevious);
|
|
||||||
|
|
||||||
$this->oResponses = $oResponses;
|
$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
|
public function GetResponses() : ?\MailSo\Imap\ResponseCollection
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue