Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Axel Huebl <[email protected]>
  • Loading branch information
franzpoeschel and ax3l committed May 6, 2022
1 parent 56bfa04 commit 76b6f05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/Error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ namespace error
{}

Internal::Internal(std::string const &what)
: Error("Internal error: " + what + "\nThis is a bug. Please report.")
: Error(
"Internal error: " + what +
"\nThis is a bug. Please report at ' "
"https://github.com/openPMD/openPMD-api/issues'.")
{}
} // namespace error
} // namespace openPMD
7 changes: 4 additions & 3 deletions src/IO/HDF5/HDF5IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ void HDF5IOHandlerImpl::createFile(
break;
case Access::READ_ONLY:
// condition has been checked above
throw std::runtime_error("Control flow error");
throw std::runtime_error(
"[HDF5] Control flow error in createFile backend access mode.");
}

hid_t id{};
Expand Down Expand Up @@ -470,8 +471,8 @@ void HDF5IOHandlerImpl::createDataset(
status = H5Ldelete(node_id, name.c_str(), H5P_DEFAULT);
VERIFY(
status == 0,
"[HDF5] Internal error: Failed to delete old dataset from "
"group for overwriting.");
"[HDF5] Internal error: Failed to delete old dataset '" +
name + "' from group for overwriting.");
break;
}
}
Expand Down

0 comments on commit 76b6f05

Please sign in to comment.