panda icon indicating copy to clipboard operation
panda copied to clipboard

Make errors on return type much harder to achieve in PyPANDA

Open lacraig2 opened this issue 1 year ago • 0 comments

This is a draft for code that would need to be propagated to other parts of PyPANDA to make it much harder for callbacks to error on the incorrect type returned from a callback.

In this case we move the type conversion that cffi would do upon return of our outer callback wrapper to the forefront and check it for errors. If there is an error we make an explicit offering of a type cast from zero.

This should be handled in the other _run_and_catch functions. It should also have a better policy on errors. Printing every time is annoying, but some feedback is useful.

lacraig2 avatar Feb 28 '24 03:02 lacraig2