开发者

DownloadError: ApplicationError

开发者 https://www.devze.com 2022-12-25 18:01 出处:网络
I have a function called DownloadData() which uses url.fetch(). From time to time it throws DownloadError: ApplicationError: 2 timed out error.

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 time开发者_开发技巧d or only DownloadError?

It is hard to reproduce this error so I can not know which except to use.

Thanks,

Joel


Just "except DownloadError:" should work fine. Your second example isn't valid Python, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号