From: Andrew McGeachie Date: Tue, 27 Oct 2009 20:27:49 +0000 (+0000) Subject: THRIFT-614. Add some more info to the exception that gets thrown when THTTPClient... X-Git-Tag: 0.2.0~18 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=73380097e1afa0e8ea94eb40f6c17c8065f022ba;p=common%2Fthrift.git THRIFT-614. Add some more info to the exception that gets thrown when THTTPClient encounters an unexpected NSURLResponse object. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@830329 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cocoa/src/transport/THTTPClient.m b/lib/cocoa/src/transport/THTTPClient.m index 6391bead..6711a0a3 100644 --- a/lib/cocoa/src/transport/THTTPClient.m +++ b/lib/cocoa/src/transport/THTTPClient.m @@ -139,7 +139,8 @@ } 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;