protected function PdoProfilerStorage::prepareStatement

4 calls to PdoProfilerStorage::prepareStatement()
PdoProfilerStorage::exec in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
PdoProfilerStorage::fetch in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
SqliteProfilerStorage::exec in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php
SqliteProfilerStorage::fetch in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php, line 159

Class

PdoProfilerStorage
Base PDO storage for profiling information in a PDO database.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

protected function prepareStatement($db, $query) {
  try {
    $stmt = $db
      ->prepare($query);
  } catch (\Exception $e) {
    $stmt = false;
  }
  if (false === $stmt) {
    throw new \RuntimeException('The database cannot successfully prepare the statement');
  }
  return $stmt;
}