handy.wang 发表于 2013-1-15 02:11:17

How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS

Comment1####################################
I was able to find the answer here: http://www.iphonedevsdk.com/forum/iphone-sdk-development/6280-uiwebview-didfailloadwitherror-how-get-errors-code-list.html
 
This thread contained this description for this error: "This error may occur if an another request is made before the previous request of WebView is completed..."
 
I worked around this by ignoring this error and letting the webview continue to load.
if ( != -999) {//show error alert, etc.}
 
Comment2####################################
"Returned when an asynchronous load is canceled. A Web Kit framework delegate will receive this error when it performs a cancel operation on a loading resource. Note that an NSURLConnection or NSURLDownload delegate will not receive this error if the download is canceled."
For my situation (and probably yours) this can be ignored:
if( == NSURLErrorCancelled) return; // Ignore this error
页: [1]
查看完整版本: How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS