In case You want to catch something like this, You could do
case arg do
1 -> do_ok()
_other -> do_error()
end
and give spec to the do_ok, do_error functions, as mentionned in this previous post
In case You want to catch something like this, You could do
case arg do
1 -> do_ok()
_other -> do_error()
end
and give spec to the do_ok, do_error functions, as mentionned in this previous post