title: D3 - Catching errors setting attributes
body: <p>I have some code which is attempting to render a pie chart with bad input data. The errors are similar to the following.</p>
  
  <pre><code>d3.js:8756 Error: &lt;path&gt; attribute d: Expected number, "…1A240,240 0 1,1 NaN,NaNL0,0Z".
  </code></pre>
  
  <p>I am wanting to be able to catch such an error (which is almost certainly caused by bad data) in order to be able to overlay a grey error to indicate that the rendering wasn't fully successful.</p>
  
  <p>Within Chrome Dev Tools I have enabled Pause on Caught exceptions (in addition to running the code within a <code>try/catch</code> block). However the code never breaks at the point of trying to set the invalid attribute.</p>
  
  <p>Without being able to catch the error the end result on screen is a half complete pie chart with some of the segments missing which is not ideal for user experience. </p>
  
  <p>Any help would be much appreciated to try and catch this error and be able to handle it nicely.</p>