summaryrefslogtreecommitdiffstats
path: root/c++/test/tvlstr.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 11:22:34 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-22 11:22:34 (GMT)
commitc37607eb58994041cbeaabdab5f1e9902794a3e9 (patch)
treeb96792d17d5bce03ad862b556f137a7b06c1449d /c++/test/tvlstr.cpp
parentc63f96d6e78cfe98de8001b662ec685467fd65df (diff)
downloadhdf5-c37607eb58994041cbeaabdab5f1e9902794a3e9.zip
hdf5-c37607eb58994041cbeaabdab5f1e9902794a3e9.tar.gz
hdf5-c37607eb58994041cbeaabdab5f1e9902794a3e9.tar.bz2
[svn-r29759] Purpose: Code improvements
Description: - Changed object in catch statements to reference - Replaced old-style casts or reinterpret_cast with static_cast - Removed unused name H5Library::need_cleanup - Removed Exception::printError from documentation Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++/test/tvlstr.cpp')
-rw-r--r--c++/test/tvlstr.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 7c81a8e..6ec7f25 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -207,7 +207,8 @@ static void test_vlstring_dataset()
} // end try block
// Catch all exceptions.
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_vlstring_dataset()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -306,7 +307,7 @@ static void test_vlstring_array_dataset()
} // end try
// Catch all exceptions.
- catch (Exception E)
+ catch (Exception& E)
{
issue_fail_msg("test_vlstring_array_dataset()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -427,7 +428,7 @@ static void test_vlstrings_special()
} // end try
// Catch all exceptions.
- catch (Exception E)
+ catch (Exception& E)
{
issue_fail_msg("test_vlstrings_special()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -513,7 +514,7 @@ static void test_vlstring_type()
} // end try block
// Catch all exceptions.
- catch (Exception E)
+ catch (Exception& E)
{
issue_fail_msg("test_vlstring_type()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -592,7 +593,7 @@ static void test_compact_vlstring()
} // end try
// Catch all exceptions.
- catch (Exception E)
+ catch (Exception& E)
{
issue_fail_msg("test_compact_vlstrings()", __LINE__, __FILE__, E.getCDetailMsg());
}
@@ -682,7 +683,8 @@ static void test_vlstring_attribute()
} // end try block
// Catch all exceptions.
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_vlstring_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_vlstring_attribute()
@@ -743,7 +745,8 @@ static void test_read_vl_string_attribute()
} // end try
// Catch all exceptions.
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_read_vl_string_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_read_vl_string_attribute
@@ -814,7 +817,8 @@ static void test_vlstring_array_attribute()
} // end try block
// Catch all exceptions.
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_vlstring_array_attribute()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // test_vlstring_array_attribute()
@@ -829,10 +833,10 @@ static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
dset.write(&data, type, space, space);
dset.close();
} // end try
- catch (FileIException ferr) {
+ catch (FileIException& ferr) {
throw;
}
- catch (DataSetIException derr) {
+ catch (DataSetIException& derr) {
throw;
}
}
@@ -853,10 +857,10 @@ static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
HDfree(data_read);
} // end try
- catch (FileIException ferr) {
+ catch (FileIException& ferr) {
throw;
}
- catch (DataSetIException derr) {
+ catch (DataSetIException& derr) {
throw;
}
}
@@ -936,7 +940,8 @@ static void test_vl_rewrite()
} // end try
// Catch all exceptions.
- catch (Exception E) {
+ catch (Exception& E)
+ {
issue_fail_msg("test_vl_rewrite()", __LINE__, __FILE__, E.getCDetailMsg());
}
} // end test_vl_rewrite()