Google App Engine UrlFetchService有一個setDeadline FetchOption,假設在觸發時引發異常。URLFetchService超時拋出哪個異常?
該應用程序可以指定撥打電話時等待的最長時間。如果超過最長等待時間,則該呼叫引發異常。
哪個例外?
如果是IOException,我應該如何區分截止時間超時和其他原因?
Google App Engine UrlFetchService有一個setDeadline FetchOption,假設在觸發時引發異常。URLFetchService超時拋出哪個異常?
該應用程序可以指定撥打電話時等待的最長時間。如果超過最長等待時間,則該呼叫引發異常。
哪個例外?
如果是IOException,我應該如何區分截止時間超時和其他原因?
將引發google.appengine.api.urlfetch.DownloadError。
找到以下由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
也許這個錯誤類沒有在java平臺上定義?在appengine-api-1.0-sdk.1.3.7.jar文件中找不到DownloadError類。 http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/package-tree.html – Stevko 2010-10-11 23:32:50
嘿,Nick J,你能否告訴我DownloadError類是公開的還是私人和什麼類延伸? – Stevko 2010-10-14 18:44:45