James E. King, III created THRIFT-4150:
------------------------------------------

             Summary: Python server or cpp client do not handle the 
unimplemented method gracefully
                 Key: THRIFT-4150
                 URL: https://issues.apache.org/jira/browse/THRIFT-4150
             Project: Thrift
          Issue Type: Bug
          Components: C++ - Compiler, C++ - Library, Python - Compiler, Python 
- Library
    Affects Versions: 0.10.0
         Environment: Ubuntu Docker
            Reporter: James E. King, III
            Priority: Minor


I added a new method to the ThriftTest service and I implemented the server and 
client in C++.  In the C++ client I added exception handling to catch 
TProtocolException and std::exception.  I expected that when TestClient sent in 
a method that the server had not implemented, a 
TProtocolException(NOT_IMPLEMENTED) would be returned.  The server log 
indicates it got to this point in theory:
{noformat}
ERROR:root:'TestHandler' object has no attribute 'testRequired'
Traceback (most recent call last):
  File 
"/home/jking/thrift/github/thrift/test/py/gen-py/ThriftTest/ThriftTest.py", 
line 1593, in process_testRequired
    self._handler.testRequired(args.req)
{noformat}

However on the C++ client side, a std::exception was received and NOT a 
TProtocolException, which is a bug:

{noformat}
testClient.testRequired() =>*** FAILED *** got back std::exception Internal 
error
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to