TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Avoid JS callback hell with 'yield' (example of a new WebDriver library)

6 pointsby jlippsalmost 12 years ago

1 comment

dmethvinalmost 12 years ago
Where&#x27;s the error handling?<p>The `yield` calls are definitely simplifying the no-errors case, but it looks like any of those yields can throw an error back to the enclosing function. All the errors from all the yields end up in the same function? If you care about some or all of them and want to tell where the problem occurred, you&#x27;d need to wrap each `yield` in a try&#x2F;catch?
评论 #6105617 未加载