ECMAScript error sink (was: Weak callbacks?)

2013-11-13 Thread David Bruant
Le 13/11/2013 06:15, Boris Zbarsky a écrit : On 11/12/13 11:07 PM, David Bruant wrote: I understand the need to know when a promise has an unhandled error at development time, I'm less clear on why you need to know it at runtime. Why would you do with this information? handle the error? The

Re: ECMAScript error sink (was: Weak callbacks?)

2013-11-13 Thread Boris Zbarsky
On 11/13/13 10:58 AM, David Bruant wrote: I'm sympathetic with this use case, but Weakrefs seem like the wrong tool to solve this problem. I think I agree on that. Ideally, the ECMAScript error sink would handled both uncaught thrown errors and unhandled promise errors. Defining unhandled

Re: ECMAScript error sink (was: Weak callbacks?)

2013-11-13 Thread Allen Wirfs-Brock
On Nov 13, 2013, at 7:58 AM, David Bruant wrote: ... The browser has window.onerror for historical reasons, Node.js introduced Domains and Domain#intercept [1] for that reason IIUC. Isn't it the sign that ECMAScript should have this feature built-in? A global sink has something absurd to