logoalt Hacker News

gdotdesign • today at 1:15 PM • 0 replies • view on HN

Roc seems to have a pretty good version of error handling I've seen so far: https://roc-lang.org/docs/main/langref/errors/

Basically you can handle the errors you want to handle and propagate everything else upstream because the error value is a union of all propagated errors. In other (typed) languages you either need to handle all errors or map the different types into a single one.