Bolt\EventListener\DoctrineListener::failConnect PHP Method

failConnect() public method

Event fired on database connection failure.
public failConnect ( Bolt\Events\FailedConnectionEvent $args )
$args Bolt\Events\FailedConnectionEvent
    public function failConnect(FailedConnectionEvent $args)
    {
        $e = $args->getException();
        $this->logger->debug($e->getMessage(), ['event' => 'exception', 'exception' => $e]);
        /*
         * Using Driver here since Platform may try to connect
         * to the database, which has failed since we are here.
         */
        $platform = $args->getDriver()->getName();
        $platform = Str::replaceFirst('pdo_', '', $platform);
        $response = $this->exceptionController->databaseConnect($platform, $e);
        throw new BootException($e->getMessage(), $e->getCode(), $e, $response);
    }