[ https://issues.apache.org/jira/browse/THRIFT-3230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14618989#comment-14618989 ]
ASF GitHub Bot commented on THRIFT-3230: ---------------------------------------- GitHub user lifei opened a pull request: https://github.com/apache/thrift/pull/545 THRIFT-3230: transform typedef when getting type name Python compiler generates wrong code if there is function throwing a typedef of exception with another namespace. We should use the real type name instead of the name of typedef. You can merge this pull request into a Git repository by running: $ git pull https://github.com/lifei/thrift THRIFT-3230 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/545.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 #545 ---- commit 13959081f2e8efbc830a3dd2cd3ebf509373fd99 Author: 软件工程师李飛 <li...@7v1.net> Date: 2015-07-08T17:23:43Z THRIFT-3230: transform typedef when getting type name Python compiler generates wrong code if there is function throwing a typedef of exception with another namespace. We should use the real type name instead of the name of typedef. ---- > Python compiler generates wrong code if there is function throwing a typedef > of exception with another namespace > ---------------------------------------------------------------------------------------------------------------- > > Key: THRIFT-3230 > URL: https://issues.apache.org/jira/browse/THRIFT-3230 > Project: Thrift > Issue Type: Bug > Components: Python - Compiler > Affects Versions: 0.9.2 > Reporter: 李飛 > Priority: Blocker > Fix For: 1.0 > > > for example: > error.thrift > ``` > namespace py error > exception KolodaException { > string message > } > ``` > biz.thrift > ``` > namespace py biz > include "error.thrift" > typedef error.KolodaException KolodaException > BizService { > void doSomeBiz() throws (1: KolodaException ex) > } > ``` > compiled code > try: > result.success = self._handler.doSomeBiz() > except KolodaException as ex: > result.ex = ex > `except KolodaException as ex:` should be `except error.KolodaException as > ex:` -- This message was sent by Atlassian JIRA (v6.3.4#6332)