merlimat opened a new pull request #1097: Validate expected types in Python 
code wrapper
URL: https://github.com/apache/incubator-pulsar/pull/1097
 
 
   ### Motivation
   
   Fixes #1092 
   
   Always validate the expected argument types and raise `ValueError` instead 
of letting the boost-python wrapper to raise exception with C++ template 
errors: 
   
   Example of error: 
   
   ```
   Traceback (most recent call last):
     File "pulsar_test.py", line 325, in test_argument_errors
       Client(None)
     File "/Users/mmerli/prg/pulsar/pulsar-client-cpp/python/pulsar.py", line 
259, in __init__
       self._client = _pulsar.Client(service_url, conf)
   Boost.Python.ArgumentError: Python argument types in
       Client.__init__(Client, NoneType, ClientConfiguration)
   did not match C++ signature:
       __init__(_object*, std::__1::basic_string<char, 
std::__1::char_traits<char>, std::__1::allocator<char> >, 
pulsar::ClientConfiguration)
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to