diff --git a/composer.json b/composer.json index e7c4b8cafe77..db5545d4694e 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "phpunit/phpcov": "^9.0.2 || ^10.0", "phpunit/phpunit": "^10.5.16 || ^11.2", "predis/predis": "^3.0", - "rector/rector": "2.3.7", + "rector/rector": "2.3.8", "shipmonk/phpstan-baseline-per-identifier": "^2.0" }, "replace": { diff --git a/system/Cache/Handlers/MemcachedHandler.php b/system/Cache/Handlers/MemcachedHandler.php index 10e2ecae0a96..6d0c8aec4d97 100644 --- a/system/Cache/Handlers/MemcachedHandler.php +++ b/system/Cache/Handlers/MemcachedHandler.php @@ -97,7 +97,7 @@ public function initialize(): void throw new CriticalError('Cache: Not support Memcache(d) extension.'); } } catch (Exception $e) { - throw new CriticalError('Cache: Memcache(d) connection refused (' . $e->getMessage() . ').'); + throw new CriticalError('Cache: Memcache(d) connection refused (' . $e->getMessage() . ').', $e->getCode(), $e); } } diff --git a/system/Cache/Handlers/PredisHandler.php b/system/Cache/Handlers/PredisHandler.php index 8919c7a1db2b..94e03773de88 100644 --- a/system/Cache/Handlers/PredisHandler.php +++ b/system/Cache/Handlers/PredisHandler.php @@ -76,7 +76,7 @@ public function initialize(): void $this->redis = new Client($this->config, ['prefix' => $this->prefix]); $this->redis->time(); } catch (Exception $e) { - throw new CriticalError('Cache: Predis connection refused (' . $e->getMessage() . ').'); + throw new CriticalError('Cache: Predis connection refused (' . $e->getMessage() . ').', $e->getCode(), $e); } } diff --git a/system/Cache/Handlers/RedisHandler.php b/system/Cache/Handlers/RedisHandler.php index 98cf33651687..7ab6e392bfbc 100644 --- a/system/Cache/Handlers/RedisHandler.php +++ b/system/Cache/Handlers/RedisHandler.php @@ -94,7 +94,7 @@ public function initialize(): void throw new CriticalError('Cache: Redis select database failed.'); } } catch (RedisException $e) { - throw new CriticalError('Cache: RedisException occurred with message (' . $e->getMessage() . ').'); + throw new CriticalError('Cache: RedisException occurred with message (' . $e->getMessage() . ').', $e->getCode(), $e); } } diff --git a/system/Database/SQLite3/Connection.php b/system/Database/SQLite3/Connection.php index 3865669a9e2d..9f015b8e9cb6 100644 --- a/system/Database/SQLite3/Connection.php +++ b/system/Database/SQLite3/Connection.php @@ -115,7 +115,7 @@ public function connect(bool $persistent = false) return $sqlite; } catch (Exception $e) { - throw new DatabaseException('SQLite3 error: ' . $e->getMessage()); + throw new DatabaseException('SQLite3 error: ' . $e->getMessage(), $e->getCode(), $e); } }