how can i do better error handling with NSURLConnection sendSynchronousRequest? is there any way i can implement
- (void)connection:(NSURLConnection *)aConn
-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:
NSError *error = nil;
NSURLResponse *response = nil;
[NSURLConnection sendSynchronousRequest: req returningResponse: &response error: &error];
if (error) {...handle the error}