[
https://issues.apache.org/jira/browse/THRIFT-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roger Meier resolved THRIFT-724.
--------------------------------
Resolution: Fixed
don't now which issue...
> User defined exceptions shouldn't derive from TException
> --------------------------------------------------------
>
> Key: THRIFT-724
> URL: https://issues.apache.org/jira/browse/THRIFT-724
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Compiler
> Affects Versions: 0.2
> Reporter: Adam Simpkins
> Priority: Minor
>
> The thrift C++ compiler currently emits code so that user-defined exception
> types derive from TException rather than std::exception. Several of our
> developers have been confused by this, because they want to use TException's
> internal message_ field, which isn't passed across the wire. (Part of the
> reason for this is that TException::what() returns message_, so when a server
> throws an exception and they try to print it in the client, they just get
> "Default TException". They then look at the code, and assume they need to set
> message_.)
> To reduce this confusion and make it more clear that TException is purely for
> thrift's local errors, user defined exceptions should just derive from
> std::exception. This is how the code generated for most of the other
> languages
> works.
> It looks like perl and ruby also derive user-defined exceptions from the
> thrift
> base exception type. If we fix this for C++, we should fix these other
> languages
> too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira