diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2013-09-24 02:12:40 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2013-09-24 02:12:40 (GMT) |
commit | 91df66782ea03416f4dae1a8171ede49fb016725 (patch) | |
tree | c8486e06ed06240e9f548d360903d6337151a8c6 /c++/examples/h5tutr_crtatt.cpp | |
parent | ab239810e1ae81f390a91dfbb3e5d68934efee55 (diff) | |
download | hdf5-91df66782ea03416f4dae1a8171ede49fb016725.zip hdf5-91df66782ea03416f4dae1a8171ede49fb016725.tar.gz hdf5-91df66782ea03416f4dae1a8171ede49fb016725.tar.bz2 |
[svn-r24195] Description:
- Improved format/comments in tutorial examples
- Added them to Makefile.* and run-c++-ex.sh.in
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 2.6 (koala)/PGI compilers
Diffstat (limited to 'c++/examples/h5tutr_crtatt.cpp')
-rw-r--r-- | c++/examples/h5tutr_crtatt.cpp | 9 |
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 ) { |