Proposal: Bind Promise Catch to Try/Catch scope
todd.hubers at alivate.com.au
Wed Jun 22 00:55:24 UTC 2016
Problem: Try blocks don’t work in a callback world.
- Implement API: window.callback.getCatch() - which is a callback to the
parent catch block scope.
- Ie. While the try scope is entered, internally the catch handler is
stored as a function (window.callback.activeCatch.push(thisCatch)). When
the try scope is left, that value is popped.
- Promise: defaults its catch callback to whatever getCatch() returns
I'm sure there are plenty more details that could be covered and "Callback
API" and "getCatch" are totally open to debate. But I hope you get the gist
of it efficiently with this email.
Todd Hubers (BBIT Hons)
Contact <http://alivate.com.au/todd/> | Availability
Sent with MailTrack
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss