O'Reilly logo
  • miraj Desai thinks this is interesting:

Essentially, what we’re saying with this line is that we want to set the PDO attribute that controls the error mode (PDO::ATTR_ERRMODE) to the mode that throws exceptions (PDO::ERRMODE_EXCEPTION).[24]

From

Cover of PHP & MySQL: Novice to Ninja, 5th Edition

Note

$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)