Bug Report
π Search Terms
generator iterator throw
π Version & Regression Information
- This is the behavior in every version I tried.
β― Playground Link
Playground link with relevant code
π» Code
function* gen() {
yield 1;
}
var g = gen();
var exception = new Error("unhandled exception");
try {
g.throw(exception);
} catch (err) {
console.log(err);
}
π Actual behavior
π Expected behavior
Error: unhandled exception