title: Verify if insert was successful in Symfony2/Doctrine/MongoDB
body: <p>My application is not alerting me to a failed insert when adding a record to a MongoDB collection with a unique index...</p>
  
  <pre><code>$dm-&gt;flush()
  </code></pre>
  
  <p>... does not complain.  I'm trying to figure out what the array parameter to flush should look like to see if that helps but getting nowhere.  flush does not return anything on success or failure.</p>
  
  <p>Any ideas on how I can verify, in my PHP/Symfony2 application, whether the insert worked without needing to query the db immediately after inserting?</p>