mozilla/pdf.js — pull request #1030 by brendandahl (2012-01-05 00:21:25+00:00)
Title: Add error backs for promises.

#957 made it so the start rendering call back was never called back on errors. To support this I've added an errrback to promise.then. This follows the commonjs promise/a spec.

At this point I'm tempted to just switch to use a full blown promise library such as https://github.com/briancavalier/when.js which is well tested and very light. If anyone else thinks this would be worthwhile I'd be happy to implement such a thing.