TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why aren't exceptions in JavaScript used often?

1 点作者 altern8超过 9 年前
I always see &quot;success&quot; and &quot;error&quot; callback functions in JavaScript code and libraries.<p>Why aren&#x27;t exceptions used more often, so that one would only need to pass a callback function, and wrap everything in a &quot;try&quot; statement?

1 comment

crocal超过 9 年前
This is quite good: <a href="http:&#x2F;&#x2F;programmers.stackexchange.com&#x2F;questions&#x2F;144326&#x2F;try-catch-in-javascript-isnt-it-a-good-practice" rel="nofollow">http:&#x2F;&#x2F;programmers.stackexchange.com&#x2F;questions&#x2F;144326&#x2F;try-ca...</a>
评论 #10634823 未加载