Skip to content

Commit 59fada4

Browse files
committed
refactor: run rector
1 parent 864abfb commit 59fada4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

system/Cache/Handlers/MemcachedHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function initialize(): void
9797
throw new CriticalError('Cache: Not support Memcache(d) extension.');
9898
}
9999
} catch (Exception $e) {
100-
throw new CriticalError('Cache: Memcache(d) connection refused (' . $e->getMessage() . ').');
100+
throw new CriticalError('Cache: Memcache(d) connection refused (' . $e->getMessage() . ').', $e->getCode(), $e);
101101
}
102102
}
103103

system/Cache/Handlers/PredisHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function initialize(): void
7676
$this->redis = new Client($this->config, ['prefix' => $this->prefix]);
7777
$this->redis->time();
7878
} catch (Exception $e) {
79-
throw new CriticalError('Cache: Predis connection refused (' . $e->getMessage() . ').');
79+
throw new CriticalError('Cache: Predis connection refused (' . $e->getMessage() . ').', $e->getCode(), $e);
8080
}
8181
}
8282

system/Cache/Handlers/RedisHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function initialize(): void
9494
throw new CriticalError('Cache: Redis select database failed.');
9595
}
9696
} catch (RedisException $e) {
97-
throw new CriticalError('Cache: RedisException occurred with message (' . $e->getMessage() . ').');
97+
throw new CriticalError('Cache: RedisException occurred with message (' . $e->getMessage() . ').', $e->getCode(), $e);
9898
}
9999
}
100100

system/Database/SQLite3/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function connect(bool $persistent = false)
115115

116116
return $sqlite;
117117
} catch (Exception $e) {
118-
throw new DatabaseException('SQLite3 error: ' . $e->getMessage());
118+
throw new DatabaseException('SQLite3 error: ' . $e->getMessage(), $e->getCode(), $e);
119119
}
120120
}
121121

0 commit comments

Comments
 (0)