I'm trying to create a rescue
that if and when there is an Twitter::Error::NotFound
error (such as does not exist) it will just keep going through the loop. Please help, thanks.
Below is the code,
begin
File.open("user_ids.txt") do |file|
file.each do |id|
puts client.user("#{id}").screen_name
rescue Twitter::Error::NotFound => error
next # skip this item
end
end
end
Instead of the retry
method is there a a method that can skip and keep moving on to the next item in the loop?
I'm pretty sure the error.rate_limit
does not apply (I copied this code from a different rescue call), is there another method to call? like error.notfound.continue_with_loop
I would like to create a rescue that if and when there is an error such as does not exist
so it will just keep going through the loop. Please help, thanks.