Stream: beginners

Topic: error handling


view this post on Zulip katro (Jul 20 2024 at 14:29):

i am very new to roc. in all the examples the errors were handled in the caller function. what if I wanna handle it in the same function where error happens and try other code paths instead?

view this post on Zulip Anton (Jul 20 2024 at 14:47):

Hi @katro,
Assuming you want to handle a Task that has encountered an error you can use Task.result! like here. Does that answer your question?

view this post on Zulip katro (Jul 20 2024 at 14:58):

oh yeah. that’s it. thanks a lot.


Last updated: Jul 05 2025 at 12:14 UTC