A way of explicitly reporting exceptions

Tab Atkins Jr. jackalmage at gmail.com
Mon Jun 23 12:08:55 PDT 2014


On Mon, Jun 23, 2014 at 11:54 AM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>   for (listener of listeners) {
>     try {
>       listener();
>     } catch (e) {
>       // Now what?
>     }
>   }

Can't you just pass e into a setTimeout()'d callback, and rethrow it
from there?  Does that mess with the stack or something?

~TJ


More information about the es-discuss mailing list