[
https://issues.apache.org/jira/browse/THRIFT-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13962209#comment-13962209
]
Jens Geyer edited comment on THRIFT-2452 at 4/7/14 8:25 PM:
------------------------------------------------------------
-1 for [this patch|^thrift-2452-python-unexpected-exceptions.patch], while I
agree on the problem itself.
At least the test server/client implementation is slightly wrong.
The requirements for this particular test are as follows (see
{{/test/ThriftTest.thrift}}):
{code}
* if arg == "Xception" throw Xception with errorCode = 1001 and message = arg
* elsen if arg == "TException" throw TException
* else do not throw anything
{code}
Regarding {{oneway}}: Correct, the do not return anything at all, including
exceptions. I have not tested that part, so no opinion here.
was (Author: jensg):
-1 for [this patch|^thrift-2452-python-unexpected-exceptions.patch], while I
agree on the problem itself.
At least the test server/client implementation is slightly wrong. The
requirements for the test are as follows (see {{/test/ThriftTest.thrift}}):
{code}
* if arg == "Xception" throw Xception with errorCode = 1001 and message = arg
* elsen if arg == "TException" throw TException
* else do not throw anything
{code}
> Python doesn't handle unexpected Exceptions in server
> -----------------------------------------------------
>
> Key: THRIFT-2452
> URL: https://issues.apache.org/jira/browse/THRIFT-2452
> Project: Thrift
> Issue Type: Bug
> Components: Python - Compiler, Python - Library
> Reporter: James Haggerty
> Attachments: thrift-2452-python-unexpected-exceptions.patch
>
>
> Based on Thrift-378, the appropriate behaviour is to throw a
> TApplicationException with an INTERNAL_ERROR.
--
This message was sent by Atlassian JIRA
(v6.2#6252)