Reputation: 673
I have a function called DownloadData() which uses url.fetch()
.
From time to time it throws DownloadError: ApplicationError: 2 timed out error
.
How can I catch this error?
With except DownloadError: ApplicationError: 2 timed
or only DownloadError
?
It is hard to reproduce this error so I can not know which except to use.
Thanks,
Joel
Upvotes: 0
Views: 693
Reputation: 101149
Just "except DownloadError:" should work fine. Your second example isn't valid Python, though.
Upvotes: 1