Sieve filters (pre release)

This commit is contained in:
RainLoop Team 2015-01-29 01:24:58 +04:00
parent 63a286a6b6
commit 0152f1583b
38 changed files with 175 additions and 63 deletions

View file

@ -37,7 +37,8 @@ class Notifications
const InvalidRecipients = 303;
const CantSaveFilters = 351;
const FiltersAreNotCorrect = 352;
const CantGetFilters = 352;
const FiltersAreNotCorrect = 355;
const CantCreateFolder = 400;
const CantRenameFolder = 401;
@ -111,6 +112,7 @@ class Notifications
self::CantSendMessage => 'CantSendMessage',
self::InvalidRecipients => 'InvalidRecipients',
self::CantSaveFilters => 'CantSaveFilters',
self::CantGetFilters => 'CantGetFilters',
self::FiltersAreNotCorrect => 'FiltersAreNotCorrect',
self::CantCreateFolder => 'CantCreateFolder',

View file

@ -25,7 +25,20 @@ class Filters extends \RainLoop\Providers\AbstractProvider
*/
public function Load($oAccount, $bAllowRaw = false)
{
return $this->IsActive() ? $this->oDriver->Load($oAccount, $bAllowRaw) : array();
try
{
return $this->IsActive() ? $this->oDriver->Load($oAccount, $bAllowRaw) : array();
}
catch (\MailSo\Net\Exceptions\SocketCanNotConnectToHostException $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::ConnectionError, $oException);
}
catch (\Exception $oException)
{
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::CantGetFilters, $oException);
}
return false;
}
/**