RedditImageGrab icon indicating copy to clipboard operation
RedditImageGrab copied to clipboard

Catch exceptions when there are errors

Open abuisman opened this issue 10 years ago • 2 comments

While downloading an exception was thrown when urlopen was called.

I am no Python programmer, but adding a try catch worked in resolving the issue for me. I am sure you can think of a better way than my code, so I didn't make a pull request.

I think it is fine to just not retrieve things where exceptions are raised because in the end we are just mass downloading some thing, so missing 1 for every 10~40 is fine.

Hope this helps.

abuisman avatar Apr 08 '14 19:04 abuisman

Can you remember which urlopen was throwing the exception?

ghost avatar Oct 12 '14 11:10 ghost

Hi Daniel,

No sorry that was quite a while ago. I can also not remember whether it was a wrong url or a url that resulted in a wrong file type.

If I get a chance I will try to rerun without the try catch and see whether it errors again or not.

abuisman avatar Oct 12 '14 13:10 abuisman