GitHub user mreve opened a pull request:
https://github.com/apache/thrift/pull/469
Thrift 727 - support C++ native exception message
Added code generating implementation of std::exception::what() function for
exceptions.
I needed to modify the tutorial's IDL file, as well as CppClient and
CppServer files, because member field of the exception defined & used there is
named "what", and that made the compiler complain.
The modification in CppClient contains only a comment - it can be
uncommented and used as a test, to see the result of my change.
Please view the discussion in Jira:
https://issues.apache.org/jira/browse/THRIFT-727
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mreve/thrift THRIFT-727
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/469.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #469
----
commit 8ca78b09e4540cd89f87bbb6ecd9854e5e5d4acd
Author: mreve <[email protected]>
Date: 2015-04-28T21:54:37Z
Change InvalidOperation field "what" to "what_op"
Because it can't coexist with generated method what().
commit 5cfd3c82095f8499f87c17a245e6d06a6d7d77ac
Author: mreve <[email protected]>
Date: 2015-04-28T21:57:24Z
Update CppClient.cpp
Added a comment that suggests using cpp-native std::exception::what()
method to obtain information about an error.
commit e49f5ce883e879e6796f8992c6550eaa33fef298
Author: mreve <[email protected]>
Date: 2015-04-28T21:59:29Z
Use the right InvalidOperation member field name
Change from "what" to "what_op" as what is now a function.
commit 73f8240b65a5eebd8ee54ef5df2e08325ee98361
Author: mreve <[email protected]>
Date: 2015-04-28T22:09:44Z
Generate std::exception::what() implementation for exceptions
commit 160528fb5db2388aaec8b0efede6023be12dd41c
Author: mreve <[email protected]>
Date: 2015-04-28T22:17:50Z
Fix the typo
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---