Changes:
- let's at least log the error message, yes it does flood your logfile
This commit is contained in:
parent
1080a840f5
commit
a7651fa1d5
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
namespace Friendica\Test\Util\Database;
|
namespace Friendica\Test\Util\Database;
|
||||||
|
|
||||||
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Database\Database;
|
use Friendica\Database\Database;
|
||||||
use Friendica\Database\DatabaseException;
|
use Friendica\Database\DatabaseException;
|
||||||
use PDO;
|
use PDO;
|
||||||
|
@ -179,7 +180,8 @@ class StaticDatabase extends Database
|
||||||
self::$staticConnection = @new ExtendedPDO($connect, $user, $pass);
|
self::$staticConnection = @new ExtendedPDO($connect, $user, $pass);
|
||||||
self::$staticConnection->setAttribute(PDO::ATTR_AUTOCOMMIT,0);
|
self::$staticConnection->setAttribute(PDO::ATTR_AUTOCOMMIT,0);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
/// @TODO At least log exception, don't ignore it!
|
// Log exception
|
||||||
|
Logger::error('Cannot establish database connection', ['exception' => $e, 'host' => $server, 'dbname' => $db]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user