emberjs/data — pull request #995 by ahawkins (2013-05-24 15:41:54+00:00)
Title: Capture and log errors from promise chains

This fixes this problem:

promise.then(function() {
throw "Fail here for whatever reason"
});

The thrown error never sees the light of day because it's treated as
promise rejection and **not** a failure. I encournted this problem when
ED was erroring _internally_ trying to sideload association. The
serializer raised an exception (inside a then callback) that was
swallowed and ruined my god damn day.