diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php index d79f49116..c53a26e80 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Folders.php @@ -56,7 +56,7 @@ trait Folders } /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* @@ -64,7 +64,7 @@ trait Folders public function FolderDelete(string $sFolderName) : void { if (!$sFolderName || 'INBOX' === $sFolderName) { - throw new \InvalidArgumentException; + throw new \ValueError; } $oInfo = $this->hasCapability('IMAP4rev2') @@ -360,7 +360,7 @@ trait Folders } if (!\strlen(\trim($sFolderName))) { - throw new \InvalidArgumentException; + throw new \ValueError; } $aSelectParams = 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 0f54b8f7d..745000f9b 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 @@ -27,7 +27,7 @@ use MailSo\Imap\Enumerations\StoreAction; trait Messages { /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* @@ -35,7 +35,7 @@ trait Messages public function FetchIterate(array $aInputFetchItems, string $sIndexRange, bool $bIndexIsUid) : iterable { if (!\strlen(\trim($sIndexRange))) { - $this->writeLogException(new \InvalidArgumentException, \LOG_ERR); + $this->writeLogException(new \ValueError('$sIndexRange is empty'), \LOG_ERR); } $aReturn = array(); @@ -138,14 +138,21 @@ trait Messages * @param resource $rMessageStream * * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* */ public function MessageAppendStream(string $sFolderName, $rMessageStream, int $iStreamSize, array $aFlagsList = null, int $iDateTime = 0) : ?int { - if (!\is_resource($rMessageStream) || !\strlen($sFolderName) || 1 > $iStreamSize) { - throw new \InvalidArgumentException; + if (!\is_resource($rMessageStream)) { + throw new \InvalidArgumentException('$rMessageStream must be a resource'); + } + if (!\strlen($sFolderName)) { + throw new \ValueError('$sFolderName is empty'); + } + if (1 > $iStreamSize) { + throw new \ValueError('$iStreamSize must be higher then 0'); } $aParams = array( @@ -202,7 +209,7 @@ trait Messages */ /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* @@ -210,7 +217,7 @@ trait Messages public function MessageCopy(string $sFromFolder, string $sToFolder, SequenceSet $oRange) : ResponseCollection { if (!$sFromFolder || !$sToFolder || !\count($oRange)) { - $this->writeLogException(new \InvalidArgumentException, \LOG_ERR); + $this->writeLogException(new \ValueError, \LOG_ERR); } $this->FolderSelect($sFromFolder); @@ -222,7 +229,7 @@ trait Messages } /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* @@ -230,7 +237,7 @@ trait Messages public function MessageMove(string $sFromFolder, string $sToFolder, SequenceSet $oRange) : void { if (!$sFromFolder || !$sToFolder || !\count($oRange)) { - $this->writeLogException(new \InvalidArgumentException, \LOG_ERR); + $this->writeLogException(new \ValueError, \LOG_ERR); } if ($this->hasCapability('MOVE')) { @@ -246,7 +253,7 @@ trait Messages } /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* @@ -254,7 +261,7 @@ trait Messages public function MessageDelete(string $sFolder, SequenceSet $oRange, bool $bExpungeAll = false) : void { if (!$sFolder || !\count($oRange)) { - $this->writeLogException(new \InvalidArgumentException, \LOG_ERR); + $this->writeLogException(new \ValueError, \LOG_ERR); } $this->FolderSelect($sFolder); @@ -279,6 +286,7 @@ trait Messages * @param resource $rMessageStream * * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Metadata.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Metadata.php index a01a4fb12..a1895f950 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Metadata.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Commands/Metadata.php @@ -112,7 +112,7 @@ trait Metadata { if ($this->hasCapability('METADATA')) { if (!$aEntries) { - throw new \InvalidArgumentException('Wrong argument for SETMETADATA command'); + throw new \ValueError('Wrong argument for SETMETADATA command'); } $arguments = [$this->EscapeFolderName($sFolderName)]; diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Folder.php b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Folder.php index f397ffaf9..258dfaf40 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Folder.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Imap/Folder.php @@ -34,12 +34,12 @@ class Folder implements \JsonSerializable public ?Responses\ACL $myRights = null; /** - * @throws \InvalidArgumentException + * @throws \ValueError */ function __construct(string $sFullName, string $sDelimiter = null, array $aAttributes = array()) { if (!\strlen($sFullName)) { - throw new \InvalidArgumentException; + throw new \ValueError; } $this->FullName = $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 1059870f7..1f9e1a644 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 @@ -99,7 +99,7 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \InvalidArgumentException + * @throws \UnexpectedValueException * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* @@ -123,7 +123,7 @@ class ImapClient extends \MailSo\Net\NetClient $sLogin = \MailSo\Base\Utils::IdnToAscii(\MailSo\Base\Utils::Trim($sLogin)); if (!\strlen($sLogin) || !\strlen($sPassword)) { - $this->writeLogException(new \InvalidArgumentException, \LOG_ERR); + $this->writeLogException(new \UnexpectedValueException, \LOG_ERR); } $type = ''; @@ -421,7 +421,7 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* @@ -430,7 +430,7 @@ class ImapClient extends \MailSo\Net\NetClient { $sCommand = \trim($sCommand); if (!\strlen($sCommand)) { - $this->writeLogException(new \InvalidArgumentException, \LOG_ERR); + $this->writeLogException(new \ValueError, \LOG_ERR); } $this->IsConnected(true); @@ -454,7 +454,7 @@ class ImapClient extends \MailSo\Net\NetClient } /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\* * @throws \MailSo\Imap\Exceptions\* diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php index c32e497e6..fc4f9f20f 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php @@ -118,7 +118,7 @@ class MailClient public function Message(string $sFolderName, int $iIndex, bool $bIndexIsUid = true, ?\MailSo\Cache\CacheClient $oCacher = null) : ?Message { if (1 > $iIndex) { - throw new \InvalidArgumentException; + throw new \ValueError; } $this->oImapClient->FolderExamine($sFolderName); @@ -187,7 +187,7 @@ class MailClient public function MessageMimeStream($mCallback, string $sFolderName, int $iIndex, string $sMimeIndex) : bool { if (!\is_callable($mCallback)) { - throw new \InvalidArgumentException; + throw new \ValueError; } $this->oImapClient->FolderExamine($sFolderName); @@ -278,7 +278,7 @@ class MailClient public function MessageAppendFile(string $sMessageFileName, string $sFolderToSave, array $aAppendFlags = null) : int { if (!\is_file($sMessageFileName) || !\is_readable($sMessageFileName)) { - throw new \InvalidArgumentException; + throw new \ValueError; } $iMessageStreamSize = \filesize($sMessageFileName); @@ -687,7 +687,7 @@ class MailClient public function MessageList(MessageListParams $oParams) : MessageCollection { if (0 > $oParams->iOffset || 0 > $oParams->iLimit || 999 < $oParams->iLimit) { - throw new \InvalidArgumentException; + throw new \ValueError; } $sSearch = \trim($oParams->sSearch); @@ -707,7 +707,7 @@ class MailClient $oParams->bUseThreads = $oParams->bUseThreads && $this->oImapClient->CapabilityValue('THREAD'); // && ($this->oImapClient->hasCapability('THREAD=REFS') || $this->oImapClient->hasCapability('THREAD=REFERENCES') || $this->oImapClient->hasCapability('THREAD=ORDEREDSUBJECT')); if ($oParams->iThreadUid && !$oParams->bUseThreads) { - throw new \InvalidArgumentException('THREAD not supported'); + throw new \ValueError('THREAD not supported'); } if (!$oInfo->MESSAGES || $oParams->iOffset > $oInfo->MESSAGES) { @@ -851,7 +851,7 @@ class MailClient public function FindMessageUidByMessageId(string $sFolderName, string $sMessageId) : ?int { if (!\strlen($sMessageId)) { - throw new \InvalidArgumentException; + throw new \ValueError; } $this->oImapClient->FolderExamine($sFolderName); @@ -892,7 +892,7 @@ class MailClient } /** - * @throws \InvalidArgumentException + * @throws \ValueError */ public function FolderCreate(string $sFolderNameInUtf8, string $sFolderParentFullName = '', bool $bSubscribeOnCreation = true, string $sDelimiter = '') : ?\MailSo\Imap\Folder { @@ -900,7 +900,7 @@ class MailClient $sFolderParentFullName = \trim($sFolderParentFullName); if (!\strlen($sFolderNameInUtf8)) { - throw new \InvalidArgumentException; + throw new \ValueError; } if (!\strlen($sDelimiter) || \strlen($sFolderParentFullName)) { @@ -976,13 +976,13 @@ class MailClient } /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException */ protected function folderModify(string $sPrevFolderFullName, string $sNewFolderFullName, bool $bSubscribe) : self { if (!\strlen($sPrevFolderFullName) || !\strlen($sNewFolderFullName)) { - throw new \InvalidArgumentException; + throw new \ValueError; } $oSubscribedFolders = array(); 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 fbb5de7ec..46decf217 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 @@ -24,12 +24,12 @@ class Email implements \JsonSerializable private string $sDkimStatus = Enumerations\DkimStatus::NONE; /** - * @throws \InvalidArgumentException + * @throws \ValueError */ function __construct(string $sEmail, string $sDisplayName = '') { if (!\strlen(\trim($sEmail)) && !\strlen(\trim($sDisplayName))) { - throw new \InvalidArgumentException; + throw new \ValueError; } $this->sEmail = \MailSo\Base\Utils::IdnToAscii( @@ -39,13 +39,13 @@ class Email implements \JsonSerializable } /** - * @throws \InvalidArgumentException + * @throws \ValueError */ public static function Parse(string $sEmailAddress) : self { $sEmailAddress = \MailSo\Base\Utils::Trim($sEmailAddress); if (!\strlen(\trim($sEmailAddress))) { - throw new \InvalidArgumentException; + throw new \ValueError; } $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 ba60a0887..11d80c562 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 @@ -144,7 +144,7 @@ class EmailCollection extends \MailSo\Base\Collection $iEmailStartPos = $iCurrentPos + 1; } - catch (\InvalidArgumentException $oException) + catch (\Throwable $oException) { } } @@ -161,7 +161,7 @@ class EmailCollection extends \MailSo\Base\Collection Email::Parse(\substr($sRawEmails, $iEmailStartPos, $iCurrentPos - $iEmailStartPos)) ); } - catch (\InvalidArgumentException $oException) {} + catch (\Throwable $oException) {} } } diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Net/NetClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Net/NetClient.php index 70a112b46..9196ac534 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Net/NetClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Net/NetClient.php @@ -71,7 +71,7 @@ abstract class NetClient } /** - * @throws \InvalidArgumentException + * @throws \ValueError * @throws \MailSo\RuntimeException * @throws \MailSo\Net\Exceptions\SocketAlreadyConnectedException * @throws \MailSo\Net\Exceptions\SocketCanNotConnectToHostException @@ -80,7 +80,7 @@ abstract class NetClient { $oSettings->host = \trim($oSettings->host); if (!\strlen($oSettings->host) || 0 > $oSettings->port || 65535 < $oSettings->port) { - $this->writeLogException(new \InvalidArgumentException, \LOG_ERR); + $this->writeLogException(new \ValueError, \LOG_ERR); } if ($this->IsConnected()) { diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php b/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php index a74855e7e..65dced595 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Sieve/SieveClient.php @@ -108,6 +108,7 @@ class SieveClient extends \MailSo\Net\NetClient $this->StartTLS(); return $this->Login($oSettings); } +// $this->writeLogException(new \UnexpectedValueException('No supported SASL mechanism found'), \LOG_ERR); $this->writeLogException(new \MailSo\Sieve\Exceptions\LoginException, \LOG_ERR); } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php index fbf5aeebc..73205871d 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/AddressBook/PdoAddressBook.php @@ -772,7 +772,7 @@ class PdoAddressBook } /** - * @throws \InvalidArgumentException + * @throws \ValueError */ public function GetSuggestions(string $sSearch, int $iLimit = 20) : array { @@ -782,7 +782,7 @@ class PdoAddressBook $sSearch = \trim($sSearch); if (!\strlen($sSearch)) { - throw new \InvalidArgumentException('Empty Search argument'); + throw new \ValueError('Empty Search argument'); } $sTypes = \implode(',', static::$aSearchInFields); @@ -936,6 +936,9 @@ class PdoAddressBook return array(); } + /** + * @throws \ValueError + */ public function IncFrec(array $aEmails, bool $bCreateAuto = true) : bool { if (1 > $this->iUserID) { @@ -959,7 +962,7 @@ class PdoAddressBook }); if (!\count($aEmailsObjects)) { - throw new \InvalidArgumentException('Empty Emails argument'); + throw new \ValueError('Empty Emails argument'); } $aExists = array(); @@ -1302,13 +1305,16 @@ SQLITEINITIAL; return $this->settings; } + /** + * @throws \ValueError + */ protected function getUserId(string $sEmail, bool $bSkipInsert = false, bool $bCache = true) : int { static $aCache = array(); $sEmail = \MailSo\Base\Utils::IdnToAscii(\trim($sEmail), true); if (empty($sEmail)) { - throw new \InvalidArgumentException('Empty Email argument'); + throw new \ValueError('Empty Email argument'); } if ($bCache && isset($aCache[$sEmail])) { diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/crypt.php b/snappymail/v/0.0.0/app/libraries/snappymail/crypt.php index c58905ee6..ad0e7cad9 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/crypt.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/crypt.php @@ -210,7 +210,7 @@ abstract class Crypt ) /* : string|false */ { if (!$data || !$iv) { - throw new \InvalidArgumentException('$data or $iv is empty string'); + throw new \ValueError('$data or $iv is empty string'); } if (!\is_callable('openssl_decrypt')) { throw new \Exception('openssl_decrypt not callable'); @@ -237,7 +237,7 @@ abstract class Crypt ) : string { if (!$data || !$iv) { - throw new \InvalidArgumentException('$data or $iv is empty string'); + throw new \ValueError('$data or $iv is empty string'); } if (!\is_callable('openssl_encrypt')) { throw new \Exception('openssl_encrypt not callable'); @@ -265,7 +265,7 @@ abstract class Crypt ) /* : mixed */ { if (!$data || !$salt) { - throw new \InvalidArgumentException('$data or $salt is empty string'); + throw new \ValueError('$data or $salt is empty string'); } $key = $salt . static::Passphrase($key); return \is_callable('xxtea_decrypt') @@ -282,7 +282,7 @@ abstract class Crypt ) : string { if (!$data || !$salt) { - throw new \InvalidArgumentException('$data or $salt is empty string'); + throw new \ValueError('$data or $salt is empty string'); } $key = $salt . static::Passphrase($key); $result = \is_callable('xxtea_encrypt') diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/dav/client.php b/snappymail/v/0.0.0/app/libraries/snappymail/dav/client.php index c3e867dd6..528f8015a 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/dav/client.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/dav/client.php @@ -32,7 +32,7 @@ class Client function __construct(array $settings) { if (!isset($settings['baseUri'])) { - throw new \InvalidArgumentException('A baseUri must be provided'); + throw new \ValueError('A baseUri must be provided'); } $this->baseUri = $settings['baseUri']; @@ -114,7 +114,7 @@ class Client foreach ($properties as $property) { if (!\preg_match('/^{([^}]*)}(.*)$/', $property, $match)) { - throw new \InvalidArgumentException('\'' . $property . '\' is not a valid clark-notation formatted string'); + throw new \ValueError('\'' . $property . '\' is not a valid clark-notation formatted string'); } if ('DAV:' === $match[1]) { $body .= ""; diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/jwt.php b/snappymail/v/0.0.0/app/libraries/snappymail/jwt.php index 323c2686e..3983709dc 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/jwt.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/jwt.php @@ -31,7 +31,7 @@ abstract class JWT $timestamp = $timestamp ?: \time(); if (empty($key)) { - throw new \InvalidArgumentException('Key may not be empty'); + throw new \ValueError('Key may not be empty'); } $jwt = \explode('.', $jwt); @@ -39,7 +39,6 @@ abstract class JWT throw new \UnexpectedValueException('Wrong number of segments'); } try { - ; $header = static::jsonDecode($jwt[0]); } catch (\Throwable $e) { throw new \UnexpectedValueException("Invalid header encoding ({$e->getMessage()})"); @@ -137,13 +136,13 @@ abstract class JWT if ($free_key) { $key = \openssl_pkey_get_private($key, $passphrase); if (!$key) { - throw new \InvalidArgumentException('Invalid key, reason: ' . \openssl_error_string()); + throw new \ValueError('Invalid key, reason: ' . \openssl_error_string()); } } try { $details = \openssl_pkey_get_details($key); if (!isset($details['key']) || OPENSSL_KEYTYPE_RSA !== $details['type']) { - throw new \InvalidArgumentException('Key is not compatible with RSA signatures'); + throw new \ValueError('Key is not compatible with RSA signatures'); } $signature = ''; if (!\openssl_sign($msg, $signature, $key, 'SHA'.\substr($alg,2))) { @@ -165,7 +164,7 @@ abstract class JWT } default: - throw new \InvalidArgumentException("Algorithm '{$alg}' not supported"); + throw new \ValueError("Algorithm '{$alg}' not supported"); } } @@ -191,13 +190,13 @@ abstract class JWT if ($free_key) { $key = \openssl_pkey_get_public($key); if (!$key) { - throw new \InvalidArgumentException('Invalid key, reason: ' . openssl_error_string()); + throw new \ValueError('Invalid key, reason: ' . openssl_error_string()); } } try { $details = \openssl_pkey_get_details($key); if (!isset($details['key']) || OPENSSL_KEYTYPE_RSA !== $details['type']) { - throw new \InvalidArgumentException('Key is not compatible with RSA signatures'); + throw new \ValueError('Key is not compatible with RSA signatures'); } $success = \openssl_verify($msg, $signature, $key, 'SHA'.\substr($alg,2)); if (-1 == $success) { @@ -223,7 +222,7 @@ abstract class JWT // case 'ES384': // case 'ES512': default: - throw new \InvalidArgumentException("Algorithm '{$alg}' not supported"); + throw new \ValueError("Algorithm '{$alg}' not supported"); } } diff --git a/snappymail/v/0.0.0/app/libraries/snappymail/sasl.php b/snappymail/v/0.0.0/app/libraries/snappymail/sasl.php index e022278af..b80b1480b 100644 --- a/snappymail/v/0.0.0/app/libraries/snappymail/sasl.php +++ b/snappymail/v/0.0.0/app/libraries/snappymail/sasl.php @@ -26,7 +26,7 @@ abstract class SASL return new $class($m[2] ?? ''); } } - throw new \Exception("Unsupported SASL mechanism type: {$type}"); + throw new \ValueError("Unsupported SASL mechanism type: {$type}"); } public static function isSupported(string $type) : bool