title: How to squeeze error message out of PDO?
body: <p>I can't seem to get any error message from PDO:</p>
  
  <pre><code>#$dbh-&gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );
  try {
    $sth = $dbh-&gt;prepare('@$%T$!!!');
    print_r($sth);
    print_r($dbh-&gt;errorInfo());
  } catch (PDOException $e) {
      echo $e-&gt;getMessage();
  }
  </code></pre>
  
  <p>It is giving out only:</p>
  
  <pre><code>PDOStatement Object
  (
      [queryString] =&gt; @$%T$!!!
  )
  Array
  (
      [0] =&gt; 00000
      [1] =&gt;
      [2] =&gt;
  )
  </code></pre>
  
  <p>setAttribute doesn't help anything.</p>
  
  <p>It's PHP 5.3.3 Apache 2.0 Handler <br/>
  PDO Driver for MySQL enabled <br/>
  Client API version mysqlnd 5.0.7-dev - 091210 - $Revision: 300533 $</p>
  
  <p>What can I do to get error information?</p>