class RuboCop::Cop::Lint::HandleExceptions
end
handle_exception
rescue
do_something
begin
# good
@example
end
handle_exception
rescue
do_something
def some_method
# good
@example
end
# do nothing
rescue
do_something
begin
# bad
@example
end
# do nothing
rescue
do_something
def some_method
# bad
@example
This cop checks for rescue blocks with no body.
def on_resbody(node)
def on_resbody(node) add_offense(node) unless node.body end