how can i do better error handling with NSURLConnection sendSynchronousRequest? is there any way i can implement
- (void)connection:(NSURLConnection *)aConn didFailWithError:(NSError *)error
i have a nsoperation queue which is getting data in background thats why i have sync request.
and if i have to implement async request then how can i wait for request to get complete. because that method can’t proceed without data.
-sendSynchronousRequest:returningResponse:error: gives you a way to get an error right there in the method itself. That last argument is really (NSError **) error; that is, a pointer to an NSError pointer. Try this: