[ https://issues.apache.org/jira/browse/THRIFT-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174454#comment-13174454 ]
Hudson commented on THRIFT-1168: -------------------------------- Integrated in Thrift #371 (See [https://builds.apache.org/job/Thrift/371/]) THRIFT-1168 C++ cob client/server: void functions that throw exceptions Patch: NewBlood roger : http://svn.apache.org/viewvc/?view=rev&rev=1221891 Files : * /thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc > C++ cob client/server: void functions that throw exceptions > ----------------------------------------------------------- > > Key: THRIFT-1168 > URL: https://issues.apache.org/jira/browse/THRIFT-1168 > Project: Thrift > Issue Type: Bug > Components: C++ - Compiler > Affects Versions: 0.6.1, 0.8 > Reporter: NewBlood > Labels: patch > Attachments: > 0001-Fix-bug-when-void-function-can-throw-an-exception.patch > > > Suppose you have a void function that can throw an exception in your Thrift > definition: > exception Error { > 1: string desc; > } > service Aggr { > void addValue(1: i32 value) throws (1: Error err); > } > When the CobClient calls recv_addValue() to process the response from the > server, recv_addValue() _always_ says that the server threw an exception. > This is due to the way the code is generated - aggr_addValue_presult::write() > always writes a "err" struct which contains a "desc" even if no exception was > thrown, and the cob client's recv_addValue() thinks that an exception is > thrown. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira