Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • @Matchu: This is the default behavior? Since when?! Commented Jan 20, 2010 at 20:09
  • Since I last built a database class a month ago or so. At least in my environment, silent mode was default. Commented Jan 20, 2010 at 20:13
  • 3
    Found it - us3.php.net/manual/en/pdo.error-handling.php - "PDO::ERRMODE_SILENT - This is the default mode." Commented Jan 20, 2010 at 20:14
  • 2
    @Matchu: Yeah you're right, thanks. Still PDO::__construct() throws a PDOException if the attempt to connect to the requested database fails. Commented Jan 20, 2010 at 21:05
  • Matchu, thanks a ton, I was already ripping off my hair because I could not get the try / catch to run. You made my day! Commented Feb 21, 2015 at 12:05