Improve error handling when duplicate variable added to a DRHDF5 #353

Added a printout that shows the logging group and variable name that
had a problem when trying to add to the HDF5 recording.
This commit is contained in:
Alex Lin 2017-01-12 08:45:28 -06:00
parent cd16d2bb93
commit dc2effe6b7

View File

@ -173,6 +173,11 @@ int Trick::DRHDF5::format_specific_init() {
*/
hdf5_info->dataset = H5PTcreate_fl(root_group, rec_buffer[ii]->ref->reference, datatype, chunk_size, 1) ;
if ( hdf5_info->dataset == H5I_BADID ) {
message_publish(MSG_ERROR, "An error occured in data record group \"%s\" when adding \"%s\".\n",
group_name.c_str() , rec_buffer[ii]->ref->reference) ;
}
hdf5_info->drb = rec_buffer[ii] ;
/* Add the new parameter element to the end of the vector.
* This effectively increases the vector size by one. */