class RuboCop::Cop::Lint::UselessRescue
def only_reraising?(resbody_node)
def only_reraising?(resbody_node) return false if use_exception_variable_in_ensure?(resbody_node) body = resbody_node.body return false if body.nil? || !body.send_type? || !body.method?(:raise) || body.receiver return true unless body.arguments? return false if body.arguments.size > 1 exception_name = body.first_argument.source exception_objects(resbody_node).include?(exception_name) end