snappymail/rainloop/v/0.0.0/app/libraries/RainLoop/Exceptions/ClientException.php
djmaze 2cada68f41 Privacy/GDPR friendly version (removed: Social, Gravatar, Facebook, Google, Twitter, DropBox, OwnCloud)
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
2020-03-09 17:04:17 +01:00

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;
}
}