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
            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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to