summaryrefslogtreecommitdiffstats
path: root/c++/test/tfile.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 20:32:18 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 20:32:18 (GMT)
commit997392079b023bf366b62c17936d4ec305739be3 (patch)
tree122ba2b1d3f3b240a88c74dd75e2d83ecdbb54e7 /c++/test/tfile.cpp
parentc37607eb58994041cbeaabdab5f1e9902794a3e9 (diff)
downloadhdf5-997392079b023bf366b62c17936d4ec305739be3.zip
hdf5-997392079b023bf366b62c17936d4ec305739be3.tar.gz
hdf5-997392079b023bf366b62c17936d4ec305739be3.tar.bz2
[svn-r29766] Description:
- Changed object in catch statements to reference (left over from previous) Platforms tested: Linux/32 2.6 (jam) (very minor)
Diffstat (limited to 'c++/test/tfile.cpp')
-rw-r--r--c++/test/tfile.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index 4ff15ce..763f9f0 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -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());
}