Open
Bug 766078
Opened 13 years ago
Updated 2 years ago
Provide some help for detecting bad uses of promises
Categories
(Core :: General, defect)
Core
General
Tracking
()
NEW
People
(Reporter: Yoric, Unassigned)
References
Details
In some debug conditions that remain to be determined, I would like to:
- log attempts to resolve/reject a promise more than once;
- log rejected promises that have no onReject handler;
- log resolved promises that have no onResolve handler.
We may wish to keep this specific to some promises (i.e. introduce another constructor similar to |defer|).
Reporter | ||
Comment 1•13 years ago
|
||
Of course, given the asynchronous nature of promises, detecting whether a onReject or onResolve handler is present cannot be done exactly. However, what can be done is something along the lines of:
- if |then| does not find an appropriate handler, start a timeout;
- once the timeout has fired, if there is still no handler, log a warning.
Comment 3•11 years ago
|
||
As per bug 902866 comment 2, I think the error case in particular should be done as a matter of urgency.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•