Quick question: Roc has crash
(similarly to panic!
in Rust), but does it also have an equivalent to catch_unwind
?
no, and the explicit plan is to never introduce anything like that :big_smile:
Alright, thanks :D
to elaborate, crash
is intended to be used only when there is no possible way to gracefully recover, and exiting the program is the only option - or when you're in a branch that you think should never be reachable (and there's no reasonable way to rule out that branch at compile time)
Yup, that was my assumption. I'm still just mulling over error handling in general, so I just wanted to check before I go off on some irrelevant tangent :stuck_out_tongue:
Last updated: Jul 06 2025 at 12:14 UTC