kriskowal / gtor

A General Theory of Reactivity
MIT License
3.03k stars 109 forks source link

Inaccurate contention that throw()ing into a generator bypasses catch blocks inside it #8

Closed domenic closed 10 years ago

domenic commented 10 years ago

Additionally, the iterator gains a throw method that allows the iterator to terminate the generator by causing the yield expression to raise the given error. The error will pass through any try- catch or finally blocks in the generators stack, and unless handled, through your own stack.

This is inaccurate, as can be seen by http://jsbin.com/burihidafoso/1/edit?js,console,output in Firefox or Chrome Canary.

kriskowal commented 10 years ago

I should use some other term than "passes through", which seems to have implied, "passes through without effect".