From c4b5f59b1b9b462a300cef3774b14d3db2b6cabf Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 30 Jan 2022 02:53:39 +0400 Subject: [PATCH] fix: bugs in exception class --- src/Appwrite/Extend/Exception.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Appwrite/Extend/Exception.php b/src/Appwrite/Extend/Exception.php index 138d9aa3e9..a2a4dbfb62 100644 --- a/src/Appwrite/Extend/Exception.php +++ b/src/Appwrite/Extend/Exception.php @@ -51,20 +51,10 @@ class Exception extends \Exception private $errorCode = ''; - static $codes = Config::getParam('errorCodes', []); - public function __construct(string $message, int $code = 0, string $errorCode = Exception::TYPE_NONE, \Throwable $previous = null) { - if (!isset(self::$codes)) { - throw new \Exception('Error codes not found', 500); - } - $this->errorCode = $errorCode; - if (isset(self::$codes[$errorCode])) { - $this->$message = self::$codes[$errorCode]['statusCode']; - } - parent::__construct($message, $code, $previous); }