C++ DataSpace constructor not throwing exception?

In this code:

        try

        {

            newSpace = new DataSpace(item->getDimensions().size(), dims,
NULL);

            itemSet = createDataSet(dataSetPath.c_str(),

                                        *newType, *newSpace);

        }

        catch (DataSpaceIException e)

        {

            ...print some error

            return -1;

        }

        catch (DataSetIException e)

        ...

If one of the value of dims is 0, then I get a segmentation fault, and
the following exception message is printed:

HDF5-DIAG: Error detected in HDF5 (1.8.0-rc2) thread 0:

  #000: H5S.c line 1544 in H5Screate_simple(): zero sized dimension for
non-unlimited dimension

    major: Invalid arguments to routine

    minor: Bad value

Is there no exception being thrown here, or do I have some error in my
code?

David McCloskey

Engineer

Software Products

Westinghouse Electric Company

Energy Center, East 479G

Monroeville, PA, 15146, USA

Phone: +1 (412) 374-3789

Email: mcclosdl@westinghouse.com

Home Page: www.westinghousenuclear.com

David,

Thank you for your report. We will look into the problem.

Elena

···

On Mar 19, 2008, at 3:44 PM, McCloskey, David L. wrote:

In this code:

        try
        {
            newSpace = new DataSpace(item->getDimensions().size(), dims, NULL);
            itemSet = createDataSet(dataSetPath.c_str(),
                                        *newType, *newSpace);
        }
        catch (DataSpaceIException e)
        {
            …print some error
            return -1;
        }
        catch (DataSetIException e)
        ...

If one of the value of dims is 0, then I get a segmentation fault, and the following exception message is printed:
HDF5-DIAG: Error detected in HDF5 (1.8.0-rc2) thread 0:
  #000: H5S.c line 1544 in H5Screate_simple(): zero sized dimension for non-unlimited dimension
    major: Invalid arguments to routine
    minor: Bad value

Is there no exception being thrown here, or do I have some error in my code?

David McCloskey
Engineer
Software Products

Westinghouse Electric Company
Energy Center, East 479G
Monroeville, PA, 15146, USA
Phone: +1 (412) 374-3789
Email: mcclosdl@westinghouse.com
Home Page: www.westinghousenuclear.com