mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 02:59:21 +03:00
Also removed: POP3, OAuth2 and update feature Added: admin password_hash/password_verify Requires: PHP 7.3+ Replaced: CRLF with LF Replaced: pclZip with ZipArchive
49 lines
1 KiB
PHP
49 lines
1 KiB
PHP
<?php
|
|
|
|
namespace RainLoop\Exceptions;
|
|
|
|
/**
|
|
* @category RainLoop
|
|
* @package Exceptions
|
|
*/
|
|
class ClientException extends Exception
|
|
{
|
|
/**
|
|
* @var bool
|
|
*/
|
|
private $bLogoutOnException;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $sAdditionalMessage;
|
|
|
|
public function __construct(int $iCode, ?\Exception $oPrevious = null, string $sAdditionalMessage = '', bool $bLogoutOnException = false)
|
|
{
|
|
parent::__construct(\RainLoop\Notifications::GetNotificationsMessage($iCode, $oPrevious),
|
|
$iCode, $oPrevious);
|
|
|
|
$this->sAdditionalMessage = $sAdditionalMessage;
|
|
|
|
$this->setLogoutOnException($bLogoutOnException);
|
|
}
|
|
|
|
public function getAdditionalMessage() : string
|
|
{
|
|
return $this->sAdditionalMessage;
|
|
}
|
|
|
|
public function getLogoutOnException() : bool
|
|
{
|
|
return $this->bLogoutOnException;
|
|
}
|
|
|
|
public function setLogoutOnException(bool $bLogoutOnException, string $sAdditionalLogoutMessage = '') : self
|
|
{
|
|
$this->bLogoutOnException = !!$bLogoutOnException;
|
|
|
|
$this->sAdditionalMessage = $sAdditionalLogoutMessage;
|
|
|
|
return $this;
|
|
}
|
|
}
|