You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (Resolved) (JIRA)" <ji...@apache.org> on 2011/12/21 22:25:30 UTC
[jira] [Resolved] (THRIFT-1168) C++ cob client/server: void
functions that throw exceptions
[ https://issues.apache.org/jira/browse/THRIFT-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roger Meier resolved THRIFT-1168.
---------------------------------
Resolution: Fixed
comitted!
thanks for the patch NewBlood!
thanks for verification Vitali!
-r
> 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