UCBerkeleySETI / rawspec

6 stars 7 forks source link

Revised error and exception processing in the fbh5 functions #44

Closed texadactyl closed 2 years ago

texadactyl commented 2 years ago

If the bitshuffle plugin is not available, we will log a warning and write the file uncompressed.

Other than unable to set an attribute and missing the bitshuffle plugin warnings (recoverable), all errors in fbh5_open are unrecoverable failures that return nonzero (permission failure, disk full, cannot create the HDF5 dataset or dataspace, etc.).

When logging attribute warnings, we will include the keyword and value which could not be set. We will try each header field even if a previous one failed to be set so that all of the failed attributes are logged.

We will need a stand-alone add/patch-an-attribute fixer utility of some sort to make the .h5 whole. Note that blimpy will crash on a missing or improperly-formed .h5 header field.

All errors in fbh5_write and fbh5_close are unrecoverable failures that return nonzero.

I noticed that on the SIGPROC side of processing, write and close errors are not diagnosed at all.