requestOptions precondition check polishing

pull/16190/head
Muxi Yan 6 years ago
parent 161dc27b2d
commit 413077101e
  1. 2
      src/objective-c/GRPCClient/GRPCCall.m

@ -98,7 +98,7 @@ const char *kCFStreamVarName = "grpc_cfstream";
- (instancetype)initWithRequestOptions:(GRPCRequestOptions *)requestOptions
responseHandler:(id<GRPCResponseHandler>)responseHandler
callOptions:(GRPCCallOptions *)callOptions {
if (!requestOptions || !requestOptions.host || !requestOptions.path) {
if (requestOptions.host.length == 0 || requestOptions.path.length == 0) {
[NSException raise:NSInvalidArgumentException format:@"Neither host nor path can be nil."];
}

Loading…
Cancel
Save