diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Exceptions/InvalidArgumentException.php b/snappymail/v/0.0.0/app/libraries/MailSo/Base/Exceptions/InvalidArgumentException.php deleted file mode 100644 index a366b6395..000000000 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Exceptions/InvalidArgumentException.php +++ /dev/null @@ -1,19 +0,0 @@ -writeLogException($oException, \LOG_WARNING, false); } @@ -540,8 +555,9 @@ trait Folders } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function FolderSubscribeList(string $sParentFolderName, string $sListPattern) : array { @@ -549,8 +565,9 @@ trait Folders } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function FolderStatusList(string $sParentFolderName, string $sListPattern) : array { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Messages.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Messages.php index f1233f36c..ab3af2be8 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Messages.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Messages.php @@ -17,7 +17,6 @@ use MailSo\Imap\Enumerations\FetchType; use MailSo\Imap\ResponseCollection; use MailSo\Imap\SequenceSet; use MailSo\Imap\Enumerations\ResponseType; -use MailSo\Base\Exceptions\InvalidArgumentException; /** * @category MailSo @@ -26,15 +25,16 @@ use MailSo\Base\Exceptions\InvalidArgumentException; trait Messages { /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Fetch(array $aInputFetchItems, string $sIndexRange, bool $bIndexIsUid) : array { if (!\strlen(\trim($sIndexRange))) { - $this->writeLogException(new InvalidArgumentException, \LOG_ERR, true); + $this->writeLogException(new \InvalidArgumentException, \LOG_ERR, true); } $aReturn = array(); @@ -130,9 +130,10 @@ trait Messages * * @param resource $rMessageAppendStream * - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageAppendStream(string $sFolderName, $rMessageAppendStream, int $iStreamSize, array $aFlagsList = null, int $iDateTime = 0) : ?int { @@ -190,14 +191,15 @@ trait Messages */ /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageCopy(string $sToFolder, SequenceSet $oRange) : ResponseCollection { if (!\count($oRange)) { - $this->writeLogException(new InvalidArgumentException, \LOG_ERR, true); + $this->writeLogException(new \InvalidArgumentException, \LOG_ERR, true); } return $this->SendRequestGetResponse( @@ -207,19 +209,20 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageMove(string $sToFolder, SequenceSet $oRange) : ResponseCollection { if (!\count($oRange)) { - $this->writeLogException(new InvalidArgumentException, \LOG_ERR, true); + $this->writeLogException(new \InvalidArgumentException, \LOG_ERR, true); } if (!$this->IsSupported('MOVE')) { $this->writeLogException( - new \MailSo\IMAP\Exceptions\RuntimeException('Move is not supported'), + new \MailSo\RuntimeException('Move is not supported'), \LOG_ERR, true); } @@ -236,9 +239,10 @@ trait Messages * * @param resource $rMessageStream * - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageReplaceStream(string $sFolderName, int $iUid, $rMessageStream, int $iStreamSize, array $aFlagsList = null, int $iDateTime = 0) : ?int { @@ -279,9 +283,10 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageStoreFlag(SequenceSet $oRange, array $aInputStoreItems, string $sStoreAction) : ?ResponseCollection { @@ -305,9 +310,10 @@ trait Messages /** * See https://tools.ietf.org/html/rfc5256 - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageSimpleSort(array $aSortTypes, string $sSearchCriterias = 'ALL', bool $bReturnUid = true) : array { @@ -333,9 +339,10 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageSimpleESearch(string $sSearchCriterias = 'ALL', array $aSearchReturn = null, bool $bReturnUid = true, string $sCharset = '', string $sLimit = '') : array { @@ -350,9 +357,10 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageSimpleESort(array $aSortTypes, string $sSearchCriterias = 'ALL', array $aSearchReturn = ['ALL'], bool $bReturnUid = true, string $sLimit = '') : array { @@ -367,9 +375,10 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageSimpleSearch(string $sSearchCriterias = 'ALL', bool $bReturnUid = true, string $sCharset = '') : array { @@ -416,9 +425,10 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageSimpleThread(string $sSearchCriterias = 'ALL', bool $bReturnUid = true) : iterable { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Quota.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Quota.php index c6151c60f..ed8a88861 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Quota.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Quota.php @@ -23,8 +23,9 @@ trait Quota /** * https://datatracker.ietf.org/doc/html/rfc2087#section-4.2 * - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Quota(string $sRootName = '') : ?array { @@ -34,8 +35,9 @@ trait Quota /** * https://datatracker.ietf.org/doc/html/rfc2087#section-4.3 * - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function QuotaRoot(string $sFolderName = 'INBOX') : ?array { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Exceptions/Exception.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Exceptions/Exception.php deleted file mode 100644 index 02b3e71ef..000000000 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Exceptions/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ -sFullName = $sFullName; $this->setDelimiter($sDelimiter); diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php index 45561cc92..97775ecb3 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/ImapClient.php @@ -80,9 +80,10 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Connect(\MailSo\Net\ConnectSettings $oSettings) : void { @@ -108,9 +109,10 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Login(array $aCredentials) : self { @@ -127,7 +129,7 @@ class ImapClient extends \MailSo\Net\NetClient if (!\strlen($sLogin) || !\strlen($sPassword)) { $this->writeLogException( - new \MailSo\Base\Exceptions\InvalidArgumentException, + new \InvalidArgumentException, \LOG_ERR, true); } @@ -141,7 +143,7 @@ class ImapClient extends \MailSo\Net\NetClient } } if (!$type) { - throw new \Exception('No supported SASL mechanism found, remote server wants: ' + throw new \MailSo\RuntimeException('No supported SASL mechanism found, remote server wants: ' . \implode(', ', \array_filter($this->Capability() ?: [], function($var){ return \str_starts_with($var, 'AUTH='); })) @@ -263,7 +265,9 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Logout() : void { @@ -285,8 +289,9 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Capability() : ?array { @@ -319,8 +324,9 @@ class ImapClient extends \MailSo\Net\NetClient * STARTTLS AUTH= LOGIN LOGINDISABLED QUOTA * METADATA METADATA-SERVER * - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function IsSupported(string $sExtentionName) : bool { @@ -342,8 +348,9 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function GetNamespace() : ?NamespaceResult { @@ -389,8 +396,9 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Noop() : self { @@ -399,8 +407,10 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function SendRequest(string $sCommand, array $aParams = array(), bool $bBreakOnLiteral = false) : string { @@ -408,7 +418,7 @@ class ImapClient extends \MailSo\Net\NetClient if (!\strlen($sCommand)) { $this->writeLogException( - new \MailSo\Base\Exceptions\InvalidArgumentException, + new \InvalidArgumentException, \LOG_ERR, true); } @@ -455,9 +465,10 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function SendRequestGetResponse(string $sCommand, array $aParams = array()) : ResponseCollection { @@ -487,9 +498,9 @@ class ImapClient extends \MailSo\Net\NetClient * This will reduce CPU time on server and moves it to the client * And can be used with the new JavaScript AbstractFetchRemote.streamPerLine(fCallback, sGetAdd) * - * @throws \MailSo\Imap\Exceptions\ResponseNotFoundException - * @throws \MailSo\Imap\Exceptions\InvalidResponseException - * @throws \MailSo\Imap\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ protected function streamResponse(string $sEndTag = null) : void { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/ESEARCH.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/ESEARCH.php index c484219bc..852c65043 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/ESEARCH.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/ESEARCH.php @@ -12,8 +12,6 @@ namespace MailSo\Imap\Requests; -use MailSo\Imap\Exceptions\RuntimeException; - /** * @category MailSo * @package Imap @@ -56,7 +54,7 @@ class ESEARCH extends Request { if (!$oImapClient->IsSupported('ESEARCH')) { $oImapClient->writeLogException( - new RuntimeException('ESEARCH is not supported'), + new \MailSo\RuntimeException('ESEARCH is not supported'), \LOG_ERR, true); } parent::__construct($oImapClient); @@ -70,7 +68,7 @@ class ESEARCH extends Request /* // RFC 6203 if (false !== \stripos($this->sCriterias, 'FUZZY') && !$this->oImapClient->IsSupported('SEARCH=FUZZY')) { $this->oImapClient->writeLogException( - new RuntimeException('SEARCH=FUZZY is not supported'), + new \MailSo\RuntimeException('SEARCH=FUZZY is not supported'), \LOG_ERR, true); } */ @@ -91,7 +89,7 @@ class ESEARCH extends Request if ($aFolders) { if (!$this->oImapClient->IsSupported('MULTISEARCH')) { $this->oImapClient->writeLogException( - new RuntimeException('MULTISEARCH is not supported'), + new \MailSo\RuntimeException('MULTISEARCH is not supported'), \LOG_ERR, true); } $sCmd = 'ESEARCH'; @@ -111,7 +109,7 @@ class ESEARCH extends Request foreach ($this->aReturn as $sReturn) { if (\preg_match('/PARTIAL|UPDATE|CONTEXT/i', $sReturn)) { $this->oImapClient->writeLogException( - new RuntimeException('CONTEXT=SEARCH is not supported'), + new \MailSo\RuntimeException('CONTEXT=SEARCH is not supported'), \LOG_ERR, true); } } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/SORT.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/SORT.php index 5cea3b477..76fc2386f 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/SORT.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/SORT.php @@ -15,8 +15,6 @@ namespace MailSo\Imap\Requests; -use MailSo\Imap\Exceptions\RuntimeException; - /** * @category MailSo * @package Imap @@ -57,7 +55,7 @@ class SORT extends Request { if (!$oImapClient->IsSupported('SORT')) { $oImapClient->writeLogException( - new RuntimeException('SORT is not supported'), + new \MailSo\RuntimeException('SORT is not supported'), \LOG_ERR, true); } parent::__construct($oImapClient); @@ -67,7 +65,7 @@ class SORT extends Request { if (!$this->aSortTypes) { $this->oImapClient->writeLogException( - new RuntimeException('SortTypes are missing'), + new \MailSo\RuntimeException('SortTypes are missing'), \LOG_ERR, true); } @@ -77,14 +75,14 @@ class SORT extends Request // RFC 5267 checks if (!$this->oImapClient->IsSupported('ESORT')) { $this->oImapClient->writeLogException( - new RuntimeException('ESORT is not supported'), + new \MailSo\RuntimeException('ESORT is not supported'), \LOG_ERR, true); } if (!$this->oImapClient->IsSupported('CONTEXT=SORT')) { foreach ($this->aReturn as $sReturn) { if (\preg_match('/PARTIAL|UPDATE|CONTEXT/i', $sReturn)) { $this->oImapClient->writeLogException( - new RuntimeException('CONTEXT=SORT is not supported'), + new \MailSo\RuntimeException('CONTEXT=SORT is not supported'), \LOG_ERR, true); } } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/THREAD.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/THREAD.php index 0029527a3..59d1986c8 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/THREAD.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Requests/THREAD.php @@ -35,7 +35,7 @@ class THREAD extends Request $this->sAlgorithm = 'ORDEREDSUBJECT'; } else { $oImapClient->writeLogException( - new \MailSo\Imap\Exceptions\RuntimeException('THREAD is not supported'), + new \MailSo\RuntimeException('THREAD is not supported'), \LOG_ERR, true); } parent::__construct($oImapClient); @@ -45,7 +45,7 @@ class THREAD extends Request { if (!$this->oImapClient->IsSupported(\strtoupper("THREAD={$this->sAlgorithm}"))) { $this->oImapClient->writeLogException( - new \MailSo\Imap\Exceptions\RuntimeException("THREAD={$this->sAlgorithm} is not supported"), + new \MailSo\RuntimeException("THREAD={$this->sAlgorithm} is not supported"), \LOG_ERR, true); } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/ResponseParser.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/ResponseParser.php index fcff6b5a4..44636cffe 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/ResponseParser.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Traits/ResponseParser.php @@ -68,7 +68,9 @@ trait ResponseParser /** * @return array|string - * @throws \MailSo\Net\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ private function partialParseResponseBranch(Response $oImapResponse, bool $bTreatAsAtom, diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Exceptions/Exception.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Exceptions/Exception.php deleted file mode 100644 index 9bf1c4212..000000000 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Exceptions/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ -oImapClient->MessageStoreFlag($oRange, array($sMessageFlag), $sStoreAction); } else if (!$bSkipUnsupportedFlag) { - throw new Exceptions\RuntimeException('Message flag "'.$sMessageFlag.'" is not supported.'); + throw new \MailSo\RuntimeException('Message flag "'.$sMessageFlag.'" is not supported.'); } } } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function Message(string $sFolderName, int $iIndex, bool $bIndexIsUid = true, ?\MailSo\Cache\CacheClient $oCacher = null, int $iBodyTextLimit = 0) : ?Message { if (!\MailSo\Base\Validator::RangeInt($iIndex, 1)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oImapClient->FolderExamine($sFolderName); @@ -216,15 +219,16 @@ class MailClient * * @param mixed $mCallback * - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageMimeStream($mCallback, string $sFolderName, int $iIndex, string $sMimeIndex) : bool { if (!\is_callable($mCallback)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oImapClient->FolderExamine($sFolderName); @@ -303,15 +307,16 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageDelete(string $sFolder, SequenceSet $oRange, bool $bExpungeAll = false) : self { if (!\strlen($sFolder) || !\count($oRange)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oImapClient->FolderSelect($sFolder); @@ -331,15 +336,16 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageMove(string $sFromFolder, string $sToFolder, SequenceSet $oRange, bool $bUseMoveSupported = true, bool $bExpungeAll = false) : self { if (!$sFromFolder || !$sToFolder || !\count($oRange)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oImapClient->FolderSelect($sFromFolder); @@ -359,15 +365,16 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageCopy(string $sFromFolder, string $sToFolder, SequenceSet $oRange) : self { if (!$sFromFolder || !$sToFolder || !\count($oRange)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oImapClient->FolderSelect($sFromFolder); @@ -377,8 +384,9 @@ class MailClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function FolderUnselect() : self { @@ -397,7 +405,7 @@ class MailClient { if (!\is_resource($rMessageStream) || !\strlen($sFolderToSave)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $iUid = $this->oImapClient->MessageAppendStream( @@ -410,7 +418,7 @@ class MailClient { if (!\is_file($sMessageFileName) || !\is_readable($sMessageFileName)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $iMessageStreamSize = \filesize($sMessageFileName); @@ -513,9 +521,10 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function FolderInformation(string $sFolderName, int $iPrevUidNext = 0, SequenceSet $oRange = null) : array { @@ -563,9 +572,10 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function FolderHash(string $sFolderName) : string { @@ -575,9 +585,10 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageListThreadsMap(string $sFolderName, string $sFolderHash, ?\MailSo\Cache\CacheClient $oCacher) : array { @@ -633,7 +644,7 @@ class MailClient $aResult[] = $aMap; } } - catch (\MailSo\Imap\Exceptions\RuntimeException $oException) + catch (\MailSo\RuntimeException $oException) { \SnappyMail\Log::warning('MessageListThreadsMap ' . $oException->getMessage()); unset($oException); @@ -655,8 +666,9 @@ class MailClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ protected function MessageListByRequestIndexOrUids(MessageCollection $oMessageCollection, SequenceSet $oRange) : void { @@ -686,7 +698,8 @@ class MailClient } /** - * @throws \MailSo\Net\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* */ public function IsThreadsSupported() : bool { @@ -696,9 +709,10 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ private function GetUids(MessageListParams $oParams, string $sSearch, string $sFolderName, string $sFolderHash, @@ -810,16 +824,17 @@ class MailClient /** * Runs SORT/SEARCH when $sSearch is provided - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Imap\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Imap\Exceptions\* */ public function MessageList(MessageListParams $oParams) : MessageCollection { if (!\MailSo\Base\Validator::RangeInt($oParams->iOffset, 0) || !\MailSo\Base\Validator::RangeInt($oParams->iLimit, 0, 999)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $sSearch = \trim($oParams->sSearch); @@ -850,7 +865,7 @@ class MailClient if ($oParams->iThreadUid && !$bUseThreads) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException('THREAD not supported'); + throw new \InvalidArgumentException('THREAD not supported'); } if (!$oParams->oCacher || !($oParams->oCacher instanceof \MailSo\Cache\CacheClient)) @@ -1015,7 +1030,7 @@ class MailClient { if (!\strlen($sMessageId)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oImapClient->FolderExamine($sFolderName); @@ -1097,7 +1112,7 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ public function FolderCreate(string $sFolderNameInUtf8, string $sFolderParentFullName = '', bool $bSubscribeOnCreation = true, string $sDelimiter = '') : ?Folder { @@ -1106,7 +1121,7 @@ class MailClient if (!\strlen($sFolderNameInUtf8)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } if (!\strlen($sDelimiter) || \strlen($sFolderParentFullName)) @@ -1115,7 +1130,7 @@ class MailClient if (null === $sDelimiter) { // TODO: Translate - throw new Exceptions\RuntimeException( + throw new \MailSo\RuntimeException( \strlen($sFolderParentFullName) ? 'Cannot create folder in non-existent parent folder.' : 'Cannot get folder delimiter.'); @@ -1130,7 +1145,7 @@ class MailClient if (\strlen($sDelimiter) && false !== \strpos($sFolderNameInUtf8, $sDelimiter)) { // TODO: Translate - throw new Exceptions\RuntimeException( + throw new \MailSo\RuntimeException( 'New folder name contains delimiter.'); } @@ -1151,31 +1166,31 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ public function FolderMove(string $sPrevFolderFullName, string $sNextFolderFullNameInUtf, bool $bSubscribeOnMove = true) : self { if (!$this->oImapClient->FolderHierarchyDelimiter($sPrevFolderFullName)) { // TODO: Translate - throw new Exceptions\RuntimeException('Cannot move non-existent folder.'); + throw new \MailSo\RuntimeException('Cannot move non-existent folder.'); } return $this->folderModify($sPrevFolderFullName, $sNextFolderFullNameInUtf, $bSubscribeOnMove); } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ public function FolderRename(string $sPrevFolderFullName, string $sNewTopFolderNameInUtf, bool $bSubscribeOnRename = true) : string { $sDelimiter = $this->oImapClient->FolderHierarchyDelimiter($sPrevFolderFullName); if (!$sDelimiter) { // TODO: Translate - throw new Exceptions\RuntimeException('Cannot rename non-existent folder.'); + throw new \MailSo\RuntimeException('Cannot rename non-existent folder.'); } if (\strlen($sDelimiter) && false !== \strpos($sNewTopFolderNameInUtf, $sDelimiter)) { // TODO: Translate - throw new Exceptions\RuntimeException('New folder name contains delimiter.'); + throw new \MailSo\RuntimeException('New folder name contains delimiter.'); } $iLast = \strrpos($sPrevFolderFullName, $sDelimiter); @@ -1188,14 +1203,14 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Base\Exceptions\RuntimeException + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException */ protected function folderModify(string $sPrevFolderFullName, string $sNewFolderFullName, bool $bSubscribe) : self { if (!\strlen($sPrevFolderFullName) || !\strlen($sNewFolderFullName)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $aSubscribeFolders = array(); @@ -1226,13 +1241,13 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Mail\Exceptions\RuntimeException + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException */ public function FolderDelete(string $sFolderFullName) : self { if (!\strlen($sFolderFullName) || 'INBOX' === $sFolderFullName) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } if ($this->oImapClient->IsSupported('IMAP4rev2')) { @@ -1253,7 +1268,7 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ public function FolderClear(string $sFolderFullName) : self { @@ -1268,25 +1283,25 @@ class MailClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ public function FolderSubscribe(string $sFolderFullName, bool $bSubscribe) : self { if (!\strlen($sFolderFullName)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oImapClient->{$bSubscribe ? 'FolderSubscribe' : 'FolderUnsubscribe'}($sFolderFullName); return $this; } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ public function SetLogger(\MailSo\Log\Logger $oLogger) : self { if (!($oLogger instanceof \MailSo\Log\Logger)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->oLogger = $oLogger; diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mime/Email.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mime/Email.php index 58862cec4..047712430 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mime/Email.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mime/Email.php @@ -38,13 +38,13 @@ class Email implements \JsonSerializable private $sDkimValue; /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ function __construct(string $sEmail, string $sDisplayName = '') { if (!\strlen(\trim($sEmail))) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $this->sEmail = \MailSo\Base\Utils::IdnToAscii( @@ -57,14 +57,14 @@ class Email implements \JsonSerializable } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException + * @throws \InvalidArgumentException */ public static function Parse(string $sEmailAddress) : self { $sEmailAddress = \MailSo\Base\Utils::Trim($sEmailAddress); if (!\strlen(\trim($sEmailAddress))) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $sName = ''; diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php index bb8b88996..a0f36e711 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mime/EmailCollection.php @@ -165,7 +165,7 @@ class EmailCollection extends \MailSo\Base\Collection $iEmailStartPos = $iCurrentPos + 1; } - catch (\MailSo\Base\Exceptions\InvalidArgumentException $oException) + catch (\InvalidArgumentException $oException) { } } @@ -183,7 +183,7 @@ class EmailCollection extends \MailSo\Base\Collection Email::Parse(\substr($sRawEmails, $iEmailStartPos, $iCurrentPos - $iEmailStartPos)) ); } - catch (\MailSo\Base\Exceptions\InvalidArgumentException $oException) {} + catch (\InvalidArgumentException $oException) {} } } } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Net/Exceptions/ConnectionException.php b/snappymail/v/0.0.0/app/libraries/MailSo/Net/Exceptions/ConnectionException.php index fa825e7e7..92de262e4 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Net/Exceptions/ConnectionException.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Net/Exceptions/ConnectionException.php @@ -16,4 +16,4 @@ namespace MailSo\Net\Exceptions; * @package Net * @subpackage Exceptions */ -class ConnectionException extends \MailSo\Net\Exceptions\Exception {} +class ConnectionException extends \MailSo\RuntimeException {} diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Net/Exceptions/Exception.php b/snappymail/v/0.0.0/app/libraries/MailSo/Net/Exceptions/Exception.php deleted file mode 100644 index c37b21a98..000000000 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Net/Exceptions/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ -writeLogException( - new \MailSo\Net\Exceptions\Exception('Cannot enable STARTTLS.'), + new \MailSo\RuntimeException('Cannot enable STARTTLS.'), \LOG_ERR, true); } } /** - * @throws \MailSo\Net\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* */ public function Disconnect() : void { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Exceptions/Exception.php b/snappymail/v/0.0.0/app/libraries/MailSo/RuntimeException.php similarity index 71% rename from snappymail/v/0.0.0/app/libraries/MailSo/Base/Exceptions/Exception.php rename to snappymail/v/0.0.0/app/libraries/MailSo/RuntimeException.php index 6240472a4..004764f93 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Base/Exceptions/Exception.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/RuntimeException.php @@ -9,20 +9,20 @@ * file that was distributed with this source code. */ -namespace MailSo\Base\Exceptions; +namespace MailSo; /** * @category MailSo - * @package Base - * @subpackage Exceptions */ -class Exception extends \Exception +class RuntimeException extends \RuntimeException { - public function __construct(string $sMessage = '', int $iCode = 0, \Throwable $oPrevious = null) +/* + public function __construct(string $sMessage = '', int $iCode = 0, ?\Throwable $oPrevious = null) { $sMessage = \strlen($sMessage) ? $sMessage - : \str_replace('\\', '-', \get_class($this)).' ('.\basename($this->getFile()).' ~ '.$this->getLine().')'; + : \str_replace('\\', '-', \get_class($this)).' ('.\basename($this->getFile()).'#'.$this->getLine().')'; parent::__construct($sMessage, $iCode, $oPrevious); } +*/ } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/Exceptions/Exception.php b/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/Exceptions/Exception.php deleted file mode 100644 index 0740485c4..000000000 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/Exceptions/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ -writeLogException( - new \MailSo\Base\Exceptions\InvalidArgumentException, + new \InvalidArgumentException, \LOG_ERR, true); } @@ -199,8 +201,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function Logout() : void { @@ -212,8 +215,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function ListScripts() : array { @@ -237,8 +241,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function Capability() : array { @@ -251,8 +256,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function Noop() : self { @@ -262,8 +268,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function GetScript(string $sScriptName) : string { @@ -291,8 +298,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function PutScript(string $sScriptName, string $sScriptSource) : self { @@ -304,8 +312,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function CheckScript(string $sScriptSource) : self { @@ -317,8 +326,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function SetActiveScript(string $sScriptName) : self { @@ -328,8 +338,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function DeleteScript(string $sScriptName) : self { @@ -339,8 +350,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function RenameScript(string $sOldName, string $sNewName) : self { @@ -350,8 +362,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function GetActiveScriptName() : string { @@ -368,8 +381,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ public function IsActiveScript(string $sScriptName) : bool { @@ -407,8 +421,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* */ private function parseStartupResponse(array $aResponse) : void { @@ -440,15 +455,16 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* */ private function sendRequest(string $sRequest) : void { if (!\strlen(\trim($sRequest))) { $this->writeLogException( - new \MailSo\Base\Exceptions\InvalidArgumentException, + new \InvalidArgumentException, \LOG_ERR, true); } @@ -458,8 +474,9 @@ class ManageSieveClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Sieve\Exceptions\NegativeResponseException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Sieve\Exceptions\* */ private function sendRequestWithCheck(string $sRequest) : void { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Smtp/Exceptions/Exception.php b/snappymail/v/0.0.0/app/libraries/MailSo/Smtp/Exceptions/Exception.php deleted file mode 100644 index 7c18f1892..000000000 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Smtp/Exceptions/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ -bMail) { $this->writeLogException( - new Exceptions\RuntimeException('No sender reverse path has been supplied'), + new \MailSo\RuntimeException('No sender reverse path has been supplied'), \LOG_ERR, true); } @@ -260,8 +264,9 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ public function MailTo(string $sTo) : self { @@ -269,14 +274,15 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ public function Data(string $sData) : self { if (!\strlen(\trim($sData))) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } $rDataStream = \MailSo\Base\ResourceRegistry::CreateMemoryResourceFromString($sData); @@ -290,21 +296,22 @@ class SmtpClient extends \MailSo\Net\NetClient /** * @param resource $rDataStream * - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ public function DataWithStream($rDataStream) : self { if (!\is_resource($rDataStream)) { - throw new \MailSo\Base\Exceptions\InvalidArgumentException; + throw new \InvalidArgumentException; } if (!$this->bRcpt) { $this->writeLogException( - new Exceptions\RuntimeException('No recipient forward path has been supplied'), + new \MailSo\RuntimeException('No recipient forward path has been supplied'), \LOG_ERR, true); } @@ -332,7 +339,7 @@ class SmtpClient extends \MailSo\Net\NetClient else if (!\feof($rDataStream)) { $this->writeLogException( - new Exceptions\RuntimeException('Cannot read input resource'), + new \MailSo\RuntimeException('Cannot read input resource'), \LOG_ERR, true); } @@ -349,8 +356,9 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ public function Rset() : self { @@ -364,8 +372,9 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ public function Vrfy(string $sUser) : self { @@ -378,8 +387,9 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ public function Noop() : self { @@ -389,8 +399,9 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ public function Logout() : void { @@ -410,7 +421,7 @@ class SmtpClient extends \MailSo\Net\NetClient if ($this->bHelo) { $this->writeLogException( - new Exceptions\RuntimeException('Cannot issue EHLO/HELO to existing session'), + new \MailSo\RuntimeException('Cannot issue EHLO/HELO to existing session'), \LOG_ERR, true); } @@ -434,15 +445,16 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* */ private function sendRequest(string $sCommand, string $sAddToCommand = '', bool $bSecureLog = false) : void { if (!\strlen(\trim($sCommand))) { $this->writeLogException( - new \MailSo\Base\Exceptions\InvalidArgumentException, + new \InvalidArgumentException, \LOG_ERR, true); } @@ -457,9 +469,10 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Base\Exceptions\InvalidArgumentException - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \InvalidArgumentException + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ private function sendRequestWithCheck(string $sCommand, $mExpectCode, string $sAddToCommand = '', bool $bSecureLog = false, string $sErrorPrefix = '') : string { @@ -488,8 +501,9 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ private function ehlo(string $sHost) : void { @@ -528,8 +542,9 @@ class SmtpClient extends \MailSo\Net\NetClient } /** - * @throws \MailSo\Net\Exceptions\Exception - * @throws \MailSo\Smtp\Exceptions\Exception + * @throws \MailSo\RuntimeException + * @throws \MailSo\Net\Exceptions\* + * @throws \MailSo\Smtp\Exceptions\* */ private function helo(string $sHost) : void { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php index c46257d12..84c20a709 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Accounts.php @@ -70,7 +70,7 @@ trait Accounts } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoAccountSetup(): array { @@ -102,7 +102,7 @@ trait Accounts } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoAccountDelete(): array { @@ -135,7 +135,7 @@ trait Accounts } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoAccountSwitch(): array { @@ -170,7 +170,7 @@ trait Accounts } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoIdentityUpdate(): array { @@ -186,7 +186,7 @@ trait Accounts } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoIdentityDelete(): array { @@ -206,7 +206,7 @@ trait Accounts } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoAccountsAndIdentitiesSortOrder(): array { @@ -237,7 +237,7 @@ trait Accounts } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoAccountsAndIdentities(): array { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php index b3706b690..ca6de9d67 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Filters.php @@ -12,7 +12,7 @@ trait Filters private $oFiltersProvider; /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFilters() : array { @@ -27,7 +27,7 @@ trait Filters } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFiltersScriptSave() : array { @@ -49,7 +49,7 @@ trait Filters } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFiltersScriptActivate() : array { @@ -65,7 +65,7 @@ trait Filters } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFiltersScriptDelete() : array { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php index d96b05a60..36c4e223e 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Folders.php @@ -21,7 +21,7 @@ trait Folders /** * Appends uploaded rfc822 message to mailbox - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function Append(): bool { @@ -318,7 +318,7 @@ trait Folders } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFolderMove() : array { @@ -341,7 +341,7 @@ trait Folders } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFolderRename() : array { @@ -369,7 +369,7 @@ trait Folders } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFolderDelete() : array { @@ -392,7 +392,7 @@ trait Folders } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFolderClear() : array { @@ -411,7 +411,7 @@ trait Folders } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFolderInformation() : array { @@ -433,7 +433,7 @@ trait Folders } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoFolderInformationMultiply() : array { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php index 99a5cb327..07e6c5dd9 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php @@ -14,7 +14,7 @@ use MailSo\Mime\Part as MimePart; trait Messages { /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoMessageList() : array { @@ -422,7 +422,7 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoMessage() : array { @@ -470,7 +470,7 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoMessageDelete() : array { @@ -503,7 +503,7 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoMessageMove() : array { @@ -571,7 +571,7 @@ trait Messages } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoMessageCopy() : array { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php index 89d58c530..5045528f5 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Pgp.php @@ -9,7 +9,7 @@ trait Pgp */ /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function GnuPG() : ?\SnappyMail\PGP\GnuPG { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Raw.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Raw.php index ec0f1a3cf..d639eea6c 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Raw.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Raw.php @@ -5,7 +5,7 @@ namespace RainLoop\Actions; trait Raw { /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function RawViewAsPlain() : bool { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php index beadc7ff2..290f479e0 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php @@ -33,7 +33,7 @@ trait User } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoLogin() : array { @@ -69,7 +69,7 @@ trait User } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoAttachmentsActions() : array { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php b/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php index 0327cd91d..fa191f9a9 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php @@ -100,7 +100,7 @@ class ActionsAdmin extends Actions } /** - * @throws \MailSo\Base\Exceptions\Exception + * @throws \MailSo\RuntimeException */ public function DoAdminLogin() : array {