Skip to content

Commit cd421ee

Browse files
authored
Merge pull request #2260 from wkliao/NC_EDIMSCALE
use NC_EDIMSCALE for errors related to dimscale
2 parents e1cc954 + 826ff73 commit cd421ee

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

libhdf5/nc4hdf.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ flag_atts_dirty(NCindex *attlist) {
7070
* @param dimscaleid HDF5 dimension scale ID.
7171
*
7272
* @returns NC_NOERR No error.
73-
* @returns NC_EHDFERR HDF5 returned an error.
73+
* @returns NC_EDIMSCALE HDF5 returned an error when trying to reattach a dimension scale.
7474
* @author Ed Hartnett
7575
*/
7676
int
@@ -113,7 +113,7 @@ rec_reattach_scales(NC_GRP_INFO_T *grp, int dimid, hid_t dimscaleid)
113113
{
114114
if (H5DSattach_scale(hdf5_var->hdf_datasetid,
115115
dimscaleid, d) < 0)
116-
return NC_EHDFERR;
116+
return NC_EDIMSCALE;
117117
hdf5_var->dimscale_attached[d] = NC_TRUE;
118118
}
119119
}
@@ -135,7 +135,7 @@ rec_reattach_scales(NC_GRP_INFO_T *grp, int dimid, hid_t dimscaleid)
135135
* @param dimscaleid HDF5 dimension scale ID.
136136
*
137137
* @returns NC_NOERR No error.
138-
* @returns NC_EHDFERR HDF5 returned an error.
138+
* @returns NC_EDIMSCALE HDF5 returned an error when trying to detach a dimension scale.
139139
* @author Ed Hartnett
140140
*/
141141
int
@@ -177,7 +177,7 @@ rec_detach_scales(NC_GRP_INFO_T *grp, int dimid, hid_t dimscaleid)
177177
{
178178
if (H5DSdetach_scale(hdf5_var->hdf_datasetid,
179179
dimscaleid, d) < 0)
180-
return NC_EHDFERR;
180+
return NC_EDIMSCALE;
181181
hdf5_var->dimscale_attached[d] = NC_FALSE;
182182
}
183183
}
@@ -1364,6 +1364,7 @@ create_group(NC_GRP_INFO_T *grp)
13641364
* @param grp Pointer to group info struct.
13651365
*
13661366
* @return ::NC_NOERR No error.
1367+
* @returns NC_EDIMSCALE HDF5 returned an error when trying to attach a dimension scale.
13671368
* @author Ed Hartnett
13681369
*/
13691370
static int
@@ -1410,7 +1411,7 @@ attach_dimscales(NC_GRP_INFO_T *grp)
14101411

14111412
/* Attach the scale. */
14121413
if (H5DSattach_scale(hdf5_var->hdf_datasetid, dsid, d) < 0)
1413-
return NC_EHDFERR;
1414+
return NC_EDIMSCALE;
14141415
hdf5_var->dimscale_attached[d] = NC_TRUE;
14151416
}
14161417
}

0 commit comments

Comments
 (0)