ion-python icon indicating copy to clipboard operation
ion-python copied to clipboard

Improve Python Error Handling from ioncmodule

Open rmarrowstone opened this issue 1 year ago • 0 comments

Many of the calls to the Python C API in ioncmodule are not checked for NULL return values, which would indicate an error, for example in ionc_add_to_container. For the most part one would only encounter these errors when actively developing or if the hardware was truly out of memory (in which the process is pretty much cooked anyway). But having better error info would help during development and debugging.

Given that the ioncmodule code is intended to be called from the python interpreter it would be better to capture the Python error information to ensure that propagated into the Python exceptions that are thrown.

rmarrowstone avatar Nov 29 '23 15:11 rmarrowstone