-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently in this spec you can write a generator function that fails with
function* gen(args) {
if (notRight(args)) {
return new Error("args error")
}
}This allows you to return run time errors without throwing them.
However this breaks with yield*
function* gen2() {
var value = yield* gen()
// value == error wtf ?
}The expected behaviour is that the error from gen() bubbles up through the yield* in gen2
The only way to fix that would be to have yield new Error("args error") instead.
I landed a commit with the fix in gens ( Raynos/gens@49b8c6e )
Metadata
Metadata
Assignees
Labels
No labels