aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-01-09 10:55:37 -0800
committerGravatar Vijay Pai <vpai@google.com>2018-01-09 10:55:37 -0800
commit75005775938c8844d42946f92b052fd1be79a0a9 (patch)
tree04a85af496559d2dc65514774e879d19dd2ed354
parent9d2d84382e317e5c8a149c497bfe9408af12b038 (diff)
Address review feedback; stop using result of 'what'
-rw-r--r--include/grpc++/impl/codegen/method_handler_impl.h4
-rw-r--r--test/cpp/end2end/exception_test.cc1
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