PDOException¶
PDOException represents an error raised by PDO. You should not throw a PDOException from your own code.
<?php
try {
$pdo = new PDO('sqlite:myfile.sqlite');
} catch(PDOException $e) {
die('Unable to open database connection');
}
?>