Closed
Bug 851321
Opened 12 years ago
Closed 11 years ago
Implement Q like promise.done()
Categories
(Add-on SDK Graveyard :: General, defect, P1)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: evold, Unassigned)
References
Details
Promise.and() would log errors in the console and not take a 2nd argument, unlike Promise.then().
Usage would be like so:
promise.then(a).then(b).and(c);
which would log an error in a, b or c
Comment 2•12 years ago
|
||
We need to implement .done() method similar to one that Q has. It's documented
in details here:
http://documentup.com/kriskowal/q/#tutorial/the-end
Summary: Implement promise.and() → Implement Q like promise.done()
Updated•12 years ago
|
Assignee: nobody → jsantell
Comment 3•12 years ago
|
||
From the document you linked: « This is a stopgap. We are exploring ways to make unhandled errors visible without any explicit handling. »
Comment 4•12 years ago
|
||
See also bug 766078 for a possible implementation strategy. For debugging mode only, of course.
Comment 5•12 years ago
|
||
Note that setting
promise._reportErrors = true;
Allows a degree of error reporting by default that seems to be working OK for us right now.
Not saying that .done(); isn't useful, just that we're not shouting for it as much.
Comment 6•12 years ago
|
||
The current promises implementation is based off of the extremely large Q, and implementing done would require a lot of rewriting -- currently investigating other Promise implementations to leverage rather than pulling out subsets from Q when we need to add a new feature (rsvp, when), while keeping the current API.
Comment 7•12 years ago
|
||
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #6)
> The current promises implementation is based off of the extremely large Q,
> and implementing done would require a lot of rewriting -- currently
> investigating other Promise implementations to leverage rather than pulling
> out subsets from Q when we need to add a new feature (rsvp, when), while
> keeping the current API.
It's code looks a lot closer to "when" to me. Irakli?
Priority: -- → P1
Comment 8•12 years ago
|
||
Discussing promises in: https://etherpad.mozilla.org/resolving-promises
Reporter | ||
Updated•12 years ago
|
Whiteboard: [good first bug]
Updated•11 years ago
|
Assignee: jsantell → nobody
Comment 9•11 years ago
|
||
Hard to believe this is a [good first bug]
Anyway, the whole module is deprecated.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Whiteboard: [good first bug]
You need to log in
before you can comment on or make changes to this bug.
Description
•