title: PHP: try/catch fail
body: <p>I'm running WAMSERVER 2.4 (32-bit) with PHP 5.4.16, this is a Laravel 3 project.</p>
  
  <p>In a <code>try</code> block, which I'm expecting to fail, I am submitting a duplicate row for insertion against a uniqueness constraint.<br>
  Instead of handling the exception in the <code>catch</code>, it's throwing an <em>"Unhandled Exception"</em> error from the <code>try</code> block and failing.</p>
  
  <pre><code>    // This throws an error if the relationship already exists.
      // If that happens, just pass it to the logger and move on.
      try {
          $entity-&gt;$pivotMethod()-&gt;attach( $rowData-&gt;get_key(), $ext );
      } catch (Exception $e) {
          $err = $e-&gt;getMessage()."\n";
          error_log($err);
      }
  </code></pre>
  
  <p>Here's the error it throws:
  Unhandled Exception</p>
  
  <p>Message:</p>
  
  <blockquote>
    <p>SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '695d7f0b-53b8-11e3-93fc-c12677e410a5-0-0-14-' for key 'unique'</p>
    
    <p>SQL: INSERT INTO <code>person_contact</code> (<code>person_uuid</code>,<code>phone_id</code>) VALUES (?, ?)<br>
    Bindings: array( 0 => '695d7f0b-53b8-11e3-93fc-c12677e410a5', 1 => 14)</p>
    
    <p>Location: C:\path\to\laravel\3_2_13\database\connection.php on line 263</p>
  </blockquote>