[ https://issues.apache.org/jira/browse/THRIFT-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vitali Lovich updated THRIFT-1168: ---------------------------------- Comment: was deleted (was: v2 - previous patch had problem when there are multiple exceptions/optional result structs. nominating this for inclusion in next release.) > 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 > > 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