[thrift] C++: Pass std::exception from server to client
authordweatherford <dev-null@apache.org>
Sat, 15 Sep 2007 08:49:48 +0000 (08:49 +0000)
committerdweatherford <dev-null@apache.org>
Sat, 15 Sep 2007 08:49:48 +0000 (08:49 +0000)
commitdf72c01c37f4404df65971b5e538c4a47985bf81
tree940f65d964992aea66900b8b938050e9e6b33de8
parent5aea7c8d00b1c25fc6611c217d929c61cddd843e
[thrift] C++: Pass std::exception from server to client

Summary: Rather than an uncaught exception dropping the connection, catching std::exception (and anything derived from it) and passing its message payload back in the form of a T_EXCEPTION message is a much cleaner response.
Reviewed By: mcslee
Test Plan: compile generated code for Synapse's tablet interface, throw a generic exception at the server, observe the message for the exception arising from the client in the form of a TApplicationException (instead of the previous 'no more data to read' exception)
Revert: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665264 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_cpp_generator.cc