On 11/20/2013 9:27 PM, Philip Chee wrote:
Currently, I'm getting this in the Error Console a few seconds after startup: Thu Nov 21 2013 13:23:23 Error: A promise chain failed to handle a rejection. Date: Thu Nov 21 2013 13:23:13 GMT+0800 (Malay Peninsula Standard Time) Full Message: [object StopIteration] Full Stack: JS frame :: resource://gre/modules/osfile/osfile_async_front.jsm :: withIterator :: line 1032 JS frame :: resource://gre/modules/Promise.jsm :: <TOP_LEVEL> :: line 767 JS frame :: resource://gre/modules/Promise.jsm :: <TOP_LEVEL> :: line 531 native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0 This is singularly unhelpful. Can we have better error stacks?
This is actually a *really* useful error stack for people who know about the library in question throwing the error, and bugs have been filed about fixing it [1] [2]. The problem is that this library is widely used, and this error shows up leading consumers of the library to think they're doing something wrong when they're not.
The problem essentially boils down to overloading the error/reject channel of Promises to signify the end of iteration. It's a promise that's rejected not because of an actual error, but because there's nothing more to iterate over. It will be fixed, and the error reporting did a good job of making it obvious that this needed to be fixed.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=938704 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=936530 _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform