THRIFT-614. Add some more info to the exception that gets thrown when THTTPClient...
authorAndrew McGeachie <geechorama@apache.org>
Tue, 27 Oct 2009 20:27:49 +0000 (20:27 +0000)
committerAndrew McGeachie <geechorama@apache.org>
Tue, 27 Oct 2009 20:27:49 +0000 (20:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@830329 13f79535-47bb-0310-9956-ffa450edef68

lib/cocoa/src/transport/THTTPClient.m

index 6391bea..6711a0a 100644 (file)
   }
   if (![response isKindOfClass: [NSHTTPURLResponse class]]) {
     @throw [TTransportException exceptionWithName: @"TTransportException"
-                                           reason: @"Unexpected NSURLResponse type"];
+                                           reason: [NSString stringWithFormat: @"Unexpected NSURLResponse type: %@",
+                                                    [response className]]];
   }
 
   NSHTTPURLResponse * httpResponse = (NSHTTPURLResponse *) response;