开发者

DownloadError: ApplicationError

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜