This pull request improves the exceptions thrown by the Python bindings. (I'm creating a separate PR, because this changes the API in a minor way).
According to the Python Documentation the SystemError exception should only be thrown if the interpreter encounters an internal error. I think ValueError works better here. Also, I changed a message that was probably copy-pasted wrong.
This pull request improves the exceptions thrown by the Python bindings. (I'm creating a separate PR, because this changes the API in a minor way).
According to the Python Documentation the
SystemError
exception should only be thrown if the interpreter encounters an internal error. I thinkValueError
works better here. Also, I changed a message that was probably copy-pasted wrong.