Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PDOException

PDOException represents an error raised by PDO. It is recommended to never throw a PDOException from custom code, and only catch such exception, emitted directly by the PHP engine.

<?php

    try {
      $pdo = new PDO('sqlite:myfile.sqlite');
    } catch(PDOException $e) {
        die('Unable to open database connection');
    } 

?>

Documentation

See Also