From 9809ce38e9f79b4e9a0b1ec1c076cce0beee1e98 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 19 Dec 2017 09:09:52 -0800 Subject: Use appropriate preprocessor guards to allow building without exceptions --- test/cpp/end2end/exception_test.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/cpp/end2end/exception_test.cc b/test/cpp/end2end/exception_test.cc index 6545ffa530..7e0d5c7951 100644 --- a/test/cpp/end2end/exception_test.cc +++ b/test/cpp/end2end/exception_test.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/test_config.h" @@ -35,6 +36,7 @@ namespace testing { const char* kErrorMessage = "This service caused an exception"; +#if GRPC_ALLOW_EXCEPTIONS class ExceptingServiceImpl : public ::grpc::testing::EchoTestService::Service { public: Status Echo(ServerContext* server_context, const EchoRequest* request, @@ -106,6 +108,8 @@ TEST_F(ExceptionTest, RequestStream) { EXPECT_EQ(s.error_message(), kErrorMessage); } +#endif + } // namespace testing } // namespace grpc -- cgit v1.2.3