六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 64|回复: 0

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

[复制链接]

升级  94.67%

58

主题

58

主题

58

主题

秀才

Rank: 2

积分
192
 楼主| 发表于 2013-1-15 02:11:17 | 显示全部楼层 |阅读模式
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 ([error code] != -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([error code] == NSURLErrorCancelled) return; // Ignore this error
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表