diff options
-rw-r--r-- | include/grpc++/impl/codegen/method_handler_impl.h | 4 | ||||
-rw-r--r-- | test/cpp/end2end/exception_test.cc | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index ed6c146e6c..daf090f86c 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -40,10 +40,8 @@ Status CatchingFunctionHandler(Callable&& handler) { #if GRPC_ALLOW_EXCEPTIONS try { return handler(); - } catch (const std::exception& e) { - return Status(StatusCode::UNKNOWN, e.what()); } catch (...) { - return Status(StatusCode::UNKNOWN, "Exception in method handler"); + return Status(StatusCode::UNKNOWN, "Unexpected error in RPC handling"); } #else // GRPC_ALLOW_EXCEPTIONS return handler(); diff --git a/test/cpp/end2end/exception_test.cc b/test/cpp/end2end/exception_test.cc index 722276d149..76272ad08a 100644 --- a/test/cpp/end2end/exception_test.cc +++ b/test/cpp/end2end/exception_test.cc @@ -105,7 +105,6 @@ TEST_F(ExceptionTest, RequestStream) { EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNKNOWN); - EXPECT_EQ(s.error_message(), kErrorMessage); } #endif // GRPC_ALLOW_EXCEPTIONS |