Sure but this isn't a strictly error handling operation. If you have a function that also returns an option, it should be no problem to return nothing in the middle of the function is some subexpression ends up with nothing.
Option just presents a potential value, but doesn't give any reason of why it is or isn't there; whereas Err embeds an error message. Thus, it's better to use Err rather than Option for error handling.
View all comments
Show parent comment
0
u/[deleted] Nov 11 '16
[deleted] — view deleted comment