No need to delegate DB errors

This commit is contained in:
Eldad Fux
2022-10-29 16:59:03 +03:00
parent 835c5de073
commit 5eb39b1ccd
2 changed files with 1 additions and 15 deletions
-5
View File
@@ -403,11 +403,6 @@ App::error()
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
$route = $utopia->match($request);
/** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */
if ($error instanceof PDOException) {
throw $error;
}
if ($logger) {
if ($error->getCode() >= 500 || $error->getCode() === 0) {
try {
+1 -10
View File
@@ -861,7 +861,7 @@ $register->set('pools', function () {
return $adapter;
});
var_dump($pool->channel->length());
$group->add($pool);
}
@@ -877,15 +877,6 @@ var_dump($pool->channel->length());
return $group;
});
$register->set('test', function () {
var_dump('[[init test!!]]');
$test = new Channel(5);
$test->push(1);
$test->push(1);
$test->push(1);
$test->push(1);
return $test;
});
$register->set('influxdb', function () {
// Register DB connection
$host = App::getEnv('_APP_INFLUXDB_HOST', '');