title: Using Doctrine DBAL, how do I determine an update failure?
body: <p>I am currently using Doctrine's <a href="http://www.doctrine-project.org/projects/dbal.html" rel="nofollow">DBAL</a> library for MySQL interfacing and have currently built a structure around:</p>
  
  <pre><code>public function update(array $data, $id)
  {
      return $this-&gt;db-&gt;update($this-&gt;table, $data, array('id' =&gt; $id));
  }
  </code></pre>
  
  <p>Which of course returns the number of affected rows. The issue now is that I perform certain actions after updates that should trigger upon a successful update. Under the current system if I was to "edit" a record (showing the form only) and immediately hit save it returns an error since I check the result of the update function above. This not only displays an error in my site but also prevents the other "successful update" actions from running. </p>
  
  <p>Is there a way to see if an update failed to run outside of the affected rows? Can I just ignore this completely and assume the update will always work? Would trapping Exceptions be enough to catch any fatal errors?</p>