Closed Bug 899214 Opened 12 years ago Closed 12 years ago

Task.spawn should catch Task.Result exceptions thrown from regular functions

Categories

(Toolkit :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 904929

People

(Reporter: Paolo, Unassigned)

References

Details

If Task.spawn caught Task.Result exceptions thrown from regular functions, this would allow this case to work correctly: let promise = Task.spawn(function () { #ifdef SHOULD_CHECK_ASYNC_CONDITION yield promiseAsyncCondition; #endif throw new Task.Result("Value."); }); This case actually happens in the Downloads API, where we currently need an additional "yield undefined;" at the end of the function for it to work correctly.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.