From c827fbc1d044f31a1f925e52e07c843f88094a74 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 1 Nov 2018 13:06:31 -0700 Subject: [PATCH] Log failures when unable to create call or channel --- src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 100d4cf2914..577002e7a85 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -257,8 +257,13 @@ // queue. Currently we use a singleton queue. _queue = [GRPCCompletionQueue completionQueue]; _channel = [GRPCChannel channelWithHost:host callOptions:callOptions]; + if (_channel == nil) { + NSLog(@"Failed to get a channel for the host."); + return nil; + } _call = [_channel unmanagedCallWithPath:path completionQueue:_queue callOptions:callOptions]; if (_call == NULL) { + NSLog(@"Failed to create a call."); return nil; } }