mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix(db): Interface Doctrine\DBAL\Exception cannot be instantiated
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
c6cd20ea8a
commit
165443046a
1 changed files with 2 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ namespace OC\DB;
|
|||
use Doctrine\Common\EventManager;
|
||||
use Doctrine\DBAL\Cache\QueryCacheProfile;
|
||||
use Doctrine\DBAL\Configuration;
|
||||
use Doctrine\DBAL\ConnectionException;
|
||||
use Doctrine\DBAL\Connections\PrimaryReadReplicaConnection;
|
||||
use Doctrine\DBAL\Driver;
|
||||
use Doctrine\DBAL\Exception;
|
||||
|
|
@ -136,7 +137,7 @@ class Connection extends PrimaryReadReplicaConnection {
|
|||
return $status;
|
||||
} catch (Exception $e) {
|
||||
// throw a new exception to prevent leaking info from the stacktrace
|
||||
throw new Exception('Failed to connect to the database: ' . $e->getMessage(), $e->getCode());
|
||||
throw new ConnectionException('Failed to connect to the database: ' . $e->getMessage(), $e->getCode());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue