aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-11-15 12:22:38 -0800
committerGravatar Muxi Yan <mxyan@google.com>2018-11-15 12:24:22 -0800
commit6b6ab2bdc9d03ffe85398451342a140320aac1dd (patch)
treeef9f2163564ded3bd810d33a56cfbdc32d8b6a43 /src/objective-c/GRPCClient/private/GRPCWrappedCall.m
parent7500528b15b3a47343a6483c1b71857cbe00244a (diff)
Back to NSAssert
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCWrappedCall.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index aa7d60786e..ae7f07f119 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -249,7 +249,7 @@
- (instancetype)initWithHost:(NSString *)host
path:(NSString *)path
callOptions:(GRPCCallOptions *)callOptions {
- GRPCAssert(host.length != 0 && path.length != 0, NSInvalidArgumentException,
+ NSAssert(host.length != 0 && path.length != 0,
@"path and host cannot be nil.");
if ((self = [super init])) {
@@ -261,6 +261,7 @@
do {
_channel = [[GRPCChannelPool sharedInstance] channelWithHost:host callOptions:callOptions];
if (_channel == nil) {
+ NSAssert(_channel != nil, @"Failed to get a channel for the host.");
NSLog(@"Failed to get a channel for the host.");
return nil;
}
@@ -272,6 +273,7 @@
// connectivity monitor disconnection).
} while (_call == NULL && disconnected);
if (_call == nil) {
+ NSAssert(_channel != nil, @"Failed to get a channel for the host.");
NSLog(@"Failed to create a call.");
return nil;
}