mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Addressed PR comments
This commit is contained in:
@@ -234,11 +234,11 @@ class Exception extends \Exception
|
||||
public const REALTIME_POLICY_VIOLATION = 'realtime_policy_violation';
|
||||
|
||||
/** Health */
|
||||
public const QUEUE_SIZE_EXCEEDS = 'queue_size_exceeds';
|
||||
public const QUEUE_SIZE_EXCEEDED = 'queue_size_exceeded';
|
||||
|
||||
protected string $type = '';
|
||||
protected array $errors = [];
|
||||
protected bool $log = true;
|
||||
protected bool $publishLog = true;
|
||||
|
||||
public function __construct(string $type = Exception::GENERAL_UNKNOWN, string $message = null, int $code = null, \Throwable $previous = null)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ class Exception extends \Exception
|
||||
if (isset($this->errors[$type])) {
|
||||
$this->code = $this->errors[$type]['code'];
|
||||
$this->message = $this->errors[$type]['description'];
|
||||
$this->log = $this->errors[$type]['log'] ?? true;
|
||||
$this->publishLog = $this->errors[$type]['publishLog'] ?? true;
|
||||
}
|
||||
|
||||
$this->message = $message ?? $this->message;
|
||||
@@ -280,12 +280,12 @@ class Exception extends \Exception
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the log of the exception.
|
||||
* Get the value of publishLog for the exception.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getLog(): bool
|
||||
public function getPublishLog(): bool
|
||||
{
|
||||
return $this->log;
|
||||
return $this->publishLog;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user