I get an NSURLErrorDomain error -999. The same code works fine with other URLs like http://www.apple.com and http://www.intel.com. It doesnt seem to be a redirect issue; I tested it by creating a tinyurl for http://www.apple.com and it worked fine with my code. Where would I find the documentation for error code -999 or how to fix the error?
"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."
So the conjecture from pumba is correct, you do not need to display it.
The code I have given before trigger a such Error because I did a loadRequest and a reload (the reload line is not necessary).
--> making a stopLoading before the new request is a good idea.
A other way to trigger such errors is to click very quickly on 2 links. The first request is canceled (--> Trigger the -999 error).
If you want to avoid such error, you can add some overhead code in order to assure that when something is loading nothing else can be loaded. But as pumba said it is not a big deal.