Skip to content

Commit

Permalink
Require that fieldNames and fieldTypes are defined before reading fro…
Browse files Browse the repository at this point in the history
…m a table
  • Loading branch information
DavidAce committed Oct 2, 2020
1 parent ab681b7 commit 0cb60e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions h5pp/include/h5pp/details/h5ppInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ namespace h5pp {
if(not numFields) error_msg.append("\t numFields\n");
if(not numRecords) error_msg.append("\t numRecords\n");
if(not recordBytes) error_msg.append("\t recordBytes\n");
if(not fieldNames) error_msg.append("\t fieldNames\n");
if(not fieldSizes) error_msg.append("\t fieldSizes\n");
if(not fieldTypes) error_msg.append("\t fieldTypes\n");
if(not fieldOffsets) error_msg.append("\t fieldOffsets\n");
if(not error_msg.empty()) throw std::runtime_error(h5pp::format("Cannot read from table: The following fields are not set:\n{}", error_msg));
// if(getTableLocId() < 0) throw std::runtime_error(h5pp::format("Cannot read from table [{}]: The location ID is not set", tablePath.value()));
Expand Down

0 comments on commit 0cb60e5

Please sign in to comment.