Y
Yan Bernatsky
Hello.
I have some method. What is preferable: use raise and rescue or use
return?
def(a, b)
# ...
rescue "some error" if some_is_wrong
rescue
another_method
false
end
or
def(a, b)
# ...
if some_is_wrong
another_method
false
end
end
I have some method. What is preferable: use raise and rescue or use
return?
def(a, b)
# ...
rescue "some error" if some_is_wrong
rescue
another_method
false
end
or
def(a, b)
# ...
if some_is_wrong
another_method
false
end
end