BlueBrain / HighFive

HighFive - Header-only C++ HDF5 interface

Home Page:https://bluebrain.github.io/HighFive/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Review stdout and error handling.

1uc opened this issue · comments

I suspect that it might be good to review what happens after an error in HDF5. The concern is that HDF5 will print it's diagnostic messages to stdout even if the error handled by the user. The behaviour I'd think would be desirable is that it prints the HDF5 diagnostic only if the error isn't handled.

Definitely broken. For example libsonata tests will assert that something throws and the HDF5 diagnostics are printed despite the exception being handled.

  test_get_inexistant_population (test_reports.TestElementReportReader.test_get_inexistant_population) ... HDF5-DIAG: Error detected in HDF5 (1.12.1) thread 0:
    #000: H5G.c line 510 in H5Gopen2(): unable to open group
      major: Symbol table
      minor: Can't open object
    #001: H5VLcallback.c line 4187 in H5VL_group_open(): group open failed
      major: Virtual Object Layer
      minor: Can't open object
    #002: H5VLcallback.c line 4154 in H5VL__group_open(): group open failed
      major: Virtual Object Layer
      minor: Can't open object
    #003: H5VLnative_group.c line 123 in H5VL__native_group_open(): unable to open group
      major: Symbol table
      minor: Can't open object
    #004: H5Gint.c line 270 in H5G__open_name(): group not found
      major: Symbol table
      minor: Object not found
    #005: H5Gloc.c line 442 in H5G_loc_find(): can't find object
      major: Symbol table
      minor: Object not found
    #006: H5Gtraverse.c line 837 in H5G_traverse(): internal path traversal failed
      major: Symbol table
      minor: Object not found
    #007: H5Gtraverse.c line 613 in H5G__traverse_real(): traversal operator failed
      major: Symbol table
      minor: Callback failed
    #008: H5Gloc.c line 399 in H5G__loc_find_cb(): object 'foobar' doesn't exist
      major: Symbol table
      minor: Object not found
  ok