From ae99e81e40c2676b96dc7fc64069f2b2f0229ed6 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 13 Aug 2019 13:32:00 -0700 Subject: [PATCH] Move kGRPCErrorDomain to interface rather than Core implementation --- src/objective-c/GRPCClient/GRPCCall.m | 2 ++ src/objective-c/GRPCClient/private/GRPCCore/NSError+GRPC.m | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 26f42032537..73ee530ef2c 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -27,6 +27,8 @@ NSString *const kGRPCHeadersKey = @"io.grpc.HeadersKey"; NSString *const kGRPCTrailersKey = @"io.grpc.TrailersKey"; +NSString *const kGRPCErrorDomain = @"io.grpc"; + /** * The response dispatcher creates its own serial dispatch queue and target the queue to the * dispatch queue of a user provided response handler. It removes the requirement of having to use diff --git a/src/objective-c/GRPCClient/private/GRPCCore/NSError+GRPC.m b/src/objective-c/GRPCClient/private/GRPCCore/NSError+GRPC.m index 3eefed88d63..a1441221b15 100644 --- a/src/objective-c/GRPCClient/private/GRPCCore/NSError+GRPC.m +++ b/src/objective-c/GRPCClient/private/GRPCCore/NSError+GRPC.m @@ -19,8 +19,7 @@ #import "NSError+GRPC.h" #include - -NSString *const kGRPCErrorDomain = @"io.grpc"; +#import @implementation NSError (GRPC) + (instancetype)grpc_errorFromStatusCode:(grpc_status_code)statusCode