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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Errors and Exceptions: Is there a third option?

1 点作者 ajayvk5 个月前

3 条评论

AnimalMuppet5 个月前
The &quot;normal&quot; third option is Maybe or Option types. (Though if you squint, that can look like returning an error with an unusual encoding.)<p>The solution proposed here looks like setting a thread property on error, and if you don&#x27;t clear it, then subsequent function calls fail (if I read that right). Personally, I don&#x27;t love it. I prefer my error handling to be open rather than hidden.
评论 #42371050 未加载
ajayvk5 个月前
This started from a discussion thread at <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42368065">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42368065</a>. Created a new topic since this could apply more generally outside of Starlark
RGamma5 个月前
Bugs