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:44:30 -06:00
parent 8a0653fa09
commit 2c93f2ac75

View File

@ -172,6 +172,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. */