mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +03:00
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, ?\Throwable $oPrevious = null, string $sAdditionalMessage = '', bool $bLogoutOnException = false)
|
|
{
|
|
parent::__construct(\RainLoop\Notifications::GetNotificationsMessage($iCode, $oPrevious),
|
|
$iCode, $oPrevious);
|
|
|
|
$this->sAdditionalMessage = $sAdditionalMessage;
|
|
|
|
$this->bLogoutOnException = $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;
|
|
}
|
|
}
|