summaryrefslogtreecommitdiffstats
path: root/c++/examples/h5tutr_crtatt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/examples/h5tutr_crtatt.cpp')
-rw-r--r--c++/examples/h5tutr_crtatt.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/c++/examples/h5tutr_crtatt.cpp b/c++/examples/h5tutr_crtatt.cpp
index 3d5b558..651dc69 100644
--- a/c++/examples/h5tutr_crtatt.cpp
+++ b/c++/examples/h5tutr_crtatt.cpp
@@ -42,33 +42,26 @@ int main (void)
// Try block to detect exceptions raised by any of the calls inside it
try
{
-
// Turn off the auto-printing when failure occurs so that we can
// handle the errors appropriately
-
Exception::dontPrint();
// Open an existing file and dataset.
-
H5File file( FILE_NAME, H5F_ACC_RDWR );
DataSet dataset = file.openDataSet( DATASET_NAME );
// Create the data space for the attribute.
-
DataSpace attr_dataspace = DataSpace (1, dims );
// Create a dataset attribute.
-
Attribute attribute = dataset.createAttribute( ATTR_NAME, PredType::STD_I32BE,
attr_dataspace);
// Write the attribute data.
-
attribute.write( PredType::NATIVE_INT, attr_data);
} // end of try block
-
// catch failure caused by the H5File operations
catch( DataSpaceIException error )
{
@@ -76,7 +69,6 @@ int main (void)
return -1;
}
-
// catch failure caused by the H5File operations
catch( AttributeIException error )
{
@@ -84,7 +76,6 @@ int main (void)
return -1;
}
-
// catch failure caused by the H5File operations
catch( FileIException error )
{