You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since yield* can give better stack traces and error reporting, should that be the recommendation in co's documentation? When using just yield, all you get is the final generator function with no reference to who invoked it.
The text was updated successfully, but these errors were encountered:
I agree. Also, switching to yield* doesn't solve the problem by itself. If the final method is a thunkified version of a node-style API (which is pretty much always), you will need to catch that exception in the inner-most generator and re-throw after adding generator-specific call stack information. I have no idea how that could be explained. :/
Having said that, until making the change above my debugging was limited to placing console.log calls everywhere and hoping for the best.
Since yield* can give better stack traces and error reporting, should that be the recommendation in co's documentation? When using just yield, all you get is the final generator function with no reference to who invoked it.
The text was updated successfully, but these errors were encountered: