Open Yurlungur opened 7 years ago
What features does Python require from this? Is this only about "don't crash, raise a Python exception instead", or is something more elaborate required?
It look as if adding ten lines or so to define a Python exception handler is all we need. Is this correct?
Yep, all we need is an exception handler. In particular, catching the H5 exceptions and raising python IOErrors higher up is basically the functionality we want.
On Sun, Oct 9, 2016, 12:08 PM Erik Schnetter notifications@github.com wrote:
What features does Python require from this? Is this only about "don't crash, raise a Python exception instead", or is something more elaborate required?
It look as if adding ten lines or so to define a Python exception handler is all we need. Is this correct?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eschnett/SimulationIO/issues/70#issuecomment-252495273, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnOsbonA6jvVIsY-C0R6D-2K8p_A1f7ks5qyRGPgaJpZM4KRg53 .
For a python API to be self-contained, it needs to be able to handle exceptions that are thrown. HDF5 passes a lot of these and they currently cause the python interpreter to segfault. We need to use the following technology: http://www.swig.org/Doc1.1/HTML/Exceptions.html