mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-18 17:40:55 +08:00
[svn-r29766] Description:
- Changed object in catch statements to reference (left over from previous) Platforms tested: Linux/32 2.6 (jam) (very minor)
This commit is contained in:
parent
c37607eb58
commit
997392079b
@ -586,7 +586,7 @@ void H5File::p_setId(const hid_t new_id)
|
||||
try {
|
||||
close();
|
||||
}
|
||||
catch (Exception E) {
|
||||
catch (Exception& E) {
|
||||
throw FileIException("H5File::p_setId", E.getDetailMsg());
|
||||
}
|
||||
// reset object's id to the given id
|
||||
|
@ -131,7 +131,7 @@ static void test_file_create()
|
||||
// Should FAIL but didn't, so throw an invalid action exception
|
||||
throw InvalidActionException("H5File constructor", "File already exists.");
|
||||
}
|
||||
catch( FileIException E ) // catching creating existing file
|
||||
catch (FileIException& E) // catching creating existing file
|
||||
{} // do nothing, FAIL expected
|
||||
|
||||
// Test create with H5F_ACC_TRUNC. This will truncate the existing file.
|
||||
@ -145,7 +145,7 @@ static void test_file_create()
|
||||
// Should FAIL but didn't, so throw an invalid action exception
|
||||
throw InvalidActionException("H5File constructor", "H5F_ACC_TRUNC attempt on an opened file.");
|
||||
}
|
||||
catch( FileIException E ) // catching truncating opened file
|
||||
catch (FileIException& E) // catching truncating opened file
|
||||
{} // do nothing, FAIL expected
|
||||
|
||||
// Try with H5F_ACC_EXCL. This should fail too because the file already
|
||||
@ -156,7 +156,7 @@ static void test_file_create()
|
||||
// Should FAIL but didn't, so throw an invalid action exception
|
||||
throw InvalidActionException("H5File constructor", "H5F_ACC_EXCL attempt on an existing file.");
|
||||
}
|
||||
catch( FileIException E ) // catching H5F_ACC_EXCL on existing file
|
||||
catch (FileIException& E) // catching H5F_ACC_EXCL on existing file
|
||||
{} // do nothing, FAIL expected
|
||||
|
||||
// Get the file-creation template
|
||||
@ -336,7 +336,7 @@ static void test_file_open()
|
||||
// Should FAIL but didn't, so throw an invalid action exception
|
||||
throw InvalidActionException("H5File constructor", "Attempt truncating an opened file.");
|
||||
}
|
||||
catch( FileIException E ) // catching H5F_ACC_TRUNC on opened file
|
||||
catch (FileIException& E) // catching H5F_ACC_TRUNC on opened file
|
||||
{} // do nothing, FAIL expected
|
||||
|
||||
// Now, really close the file.
|
||||
@ -353,7 +353,8 @@ static void test_file_open()
|
||||
PASSED();
|
||||
} // end of try block
|
||||
|
||||
catch( Exception E ) {
|
||||
catch (Exception& E)
|
||||
{
|
||||
issue_fail_msg("test_file_open()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
} // test_file_open()
|
||||
@ -411,7 +412,8 @@ static void test_file_size()
|
||||
PASSED();
|
||||
} // end of try block
|
||||
|
||||
catch( Exception E ) {
|
||||
catch (Exception& E)
|
||||
{
|
||||
issue_fail_msg("test_file_size()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ static void test_h5s_basic()
|
||||
// Should FAIL but didn't, so throw an invalid action exception
|
||||
throw InvalidActionException("DataSpace constructor", "Library allowed overwrite of existing dataset");
|
||||
}
|
||||
catch( DataSpaceIException E ) // Simple data space with too many dims
|
||||
catch (DataSpaceIException& E) // Simple data space with too many dims
|
||||
{} // do nothing, exception expected
|
||||
|
||||
/*
|
||||
@ -204,7 +204,7 @@ static void test_h5s_basic()
|
||||
// Should FAIL but didn't, so throw an invalid action exception
|
||||
throw InvalidActionException("H5File::openDataSet", "Opening a dataset with higher dimensionality than what the library can handle");
|
||||
}
|
||||
catch( FileIException E ) // catching higher dimensionality dataset
|
||||
catch (FileIException& E) // catching higher dimensionality dataset
|
||||
{} // do nothing, exception expected
|
||||
|
||||
// CHECK_I(ret, "H5Fclose"); // leave this here, later, fake a failure
|
||||
|
Loading…
x
Reference in New Issue
Block a user