mbostock/d3 — pull request #1264 by mbostock (2013-05-23 00:01:52+00:00)
Title: If xhr.response errors, callback with error.

Fixes #1261. Previously, if d3.json was used to load invalid JSON, a SyntaxError would be thrown. Now an error is reported to the callback instead, in the same manner as if a network error occurred. This allows the caller to handle the invalid response, rather than throwing an asynchronous error.