class RuboCop::Cop::Lint::ShadowedException

def offense_range(rescues)

def offense_range(rescues)
  first_rescue = rescues.first
  last_rescue = rescues.last
  last_exceptions, = *last_rescue
  # last_rescue clause may not specify exception class
  end_pos = if last_exceptions
              last_exceptions.loc.expression.end_pos
            else
              last_rescue.loc.keyword.end_pos
            end
  range_between(first_rescue.loc.expression.begin_pos, end_pos)
end