Module H5E¶
Implements HDF5 error support and Python exception translation.
- class h5py.h5e.H5Error¶
- Base class for internal HDF5 library exceptions.
- h5py.h5e.verbose(BOOL verbose)¶
- If FALSE (default), exception messages are a single line. If TRUE, an HDF5 stack trace is attached.
- h5py.h5e.register_thread() → HDF5ErrorHandler¶
Register the current thread for native HDF5 exception support.
Code which uses the low-level HDF5 API (h5py.h5*) is required to call this function before using HDF5. The main thread is automatically registered when h5py is imported. The high-level interface (h5py.*) is unaffected.
Returns an opaque object which represents the previously-installed error handler. Passing this object to unregister_thread will restore the previous behavior.
- h5py.h5e.unregister_thread(HDF5ErrorHandler handler=None)¶
Unregister the current thread, turning off HDF5 exception support.
This will disable h5py in the current thread, making third-party libraries free to interact with the HDF5 error subsystem as they wish. Call register_thread() again to re-enable exception support.
If a “native” error handler has been retrieved with register_thread(), it can be reinstalled by passing it to this function. If not, it installs the default HDF5 handler H5Eprint.
Does not affect any other thread. Safe to call more than once.