URLFetchService 因超时而引发哪个异常?

发布于 2024-09-26 13:30:50 字数 216 浏览 1 评论 0原文

Google App Engine UrlFetchService 有一个 setDeadline FetchOption,假设在触发时引发异常。

应用程序可以指定拨打电话时等待的最长时间。如果超过最大等待时间,调用将引发异常。

哪个例外?

如果是 IOException,我应该如何区分截止时间超时和其他原因?

The Google App Engine UrlFetchService has a setDeadline FetchOption which is suppose to raise an exception when tripped.

The app can specify the maximum amount of time to wait when it makes the call. If the maximum wait time is exceeded, the call raises an exception.

Which Exception?

If it is an IOException, how should I discriminate between a deadline timeout and other causes?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柠北森屋 2024-10-03 13:30:50

将引发 google.appengine.api.urlfetch.DownloadError。

A google.appengine.api.urlfetch.DownloadError will be raised.

情深如许 2024-10-03 13:30:50

找到下面由 urlfetch 服务定义/引发的异常列表。

不确定 ApiDeadlineExceededException 是否是这个异常。

    com.google.apphosting.api.ApiProxy.UnknownException
    com.google.apphosting.api.ApiProxy.ResponseTooLargeException
    com.google.apphosting.api.ApiProxy.RequestTooLargeException
    com.google.apphosting.api.ApiProxy.OverQuotaException
    com.google.apphosting.api.ApiProxy.FeatureNotEnabledException
    com.google.apphosting.api.ApiProxy.CapabilityDisabledException
    com.google.apphosting.api.ApiProxy.CancelledException
    com.google.apphosting.api.ApiProxy.ApiDeadlineExceededException
    com.google.apphosting.api.ApiProxy.ArgumentException
    com.google.apphosting.api.ApiProxy.CallNotFoundException
    com.google.apphosting.api.ApiProxy.RPCFailedException
    com.google.apphosting.api.ApiProxy.ApplicationException
    com.google.apphosting.api.ApiProxy.ApiProxyException

Found the list of exceptions below that are defined/thrown by the urlfetch service.

Not sure if ApiDeadlineExceededException is the one.

    com.google.apphosting.api.ApiProxy.UnknownException
    com.google.apphosting.api.ApiProxy.ResponseTooLargeException
    com.google.apphosting.api.ApiProxy.RequestTooLargeException
    com.google.apphosting.api.ApiProxy.OverQuotaException
    com.google.apphosting.api.ApiProxy.FeatureNotEnabledException
    com.google.apphosting.api.ApiProxy.CapabilityDisabledException
    com.google.apphosting.api.ApiProxy.CancelledException
    com.google.apphosting.api.ApiProxy.ApiDeadlineExceededException
    com.google.apphosting.api.ApiProxy.ArgumentException
    com.google.apphosting.api.ApiProxy.CallNotFoundException
    com.google.apphosting.api.ApiProxy.RPCFailedException
    com.google.apphosting.api.ApiProxy.ApplicationException
    com.google.apphosting.api.ApiProxy.ApiProxyException
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文