Posted by r_topor on 03/29/06 16:06
I'm just starting to use PDO for the first time under PHP 5.1. But
something doesn't work right in the following situation:
try {
$dbh = new PDO(...);
...
} catch (PDOException $e) {
print("Error!" . $e->getMessage());
die();
}
If an error occurs in constructing the new PDO instance, e.g., because
a wrong username/password, then the error is not printed. The
application just dies. PDO works fine on my installation when there
are no errors. What do I have to do to see the error message when a
PDO exception occurs in such a try/catch block?
Rodney
Navigation:
[Reply to this message]
|