diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-04-22 22:42:22 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2016-04-22 22:42:22 (GMT) |
commit | d490c837eb601c4a7eee8fba62ce8ba9adb0e9a1 (patch) | |
tree | 604b7e94e35625072c61f2a286862f779dba93c6 /c++/src/H5File.cpp | |
parent | 58803d08320c0f704bc4cca600e9701572ddc1b4 (diff) | |
download | hdf5-d490c837eb601c4a7eee8fba62ce8ba9adb0e9a1.zip hdf5-d490c837eb601c4a7eee8fba62ce8ba9adb0e9a1.tar.gz hdf5-d490c837eb601c4a7eee8fba62ce8ba9adb0e9a1.tar.bz2 |
[svn-r29769] 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
Merged from trunk r29759 and r29766
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5File.cpp')
-rw-r--r-- | c++/src/H5File.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp index 69eaa89..227e1c5 100644 --- a/c++/src/H5File.cpp +++ b/c++/src/H5File.cpp @@ -88,7 +88,7 @@ H5File::H5File( const char* name, unsigned int flags, const FileCreatPropList& c { try { p_get_file(name, flags, create_plist, access_plist); - } catch (FileIException open_file) { + } catch (FileIException& open_file) { throw open_file; } } @@ -113,7 +113,7 @@ H5File::H5File( const H5std_string& name, unsigned int flags, const FileCreatPro { try { p_get_file(name.c_str(), flags, create_plist, access_plist); - } catch (FileIException open_file) { + } catch (FileIException& open_file) { throw open_file; } } @@ -245,7 +245,7 @@ void H5File::openFile(const char* name, unsigned int flags, const FileAccPropLis try { close(); } - catch (Exception close_error) { + catch (Exception& close_error) { throw FileIException("H5File::openFile", close_error.getDetailMsg()); } @@ -294,7 +294,7 @@ void H5File::reOpen() try { close(); } - catch (Exception close_error) { + catch (Exception& close_error) { throw FileIException("H5File::reOpen", close_error.getDetailMsg()); } @@ -569,7 +569,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 @@ -633,7 +633,7 @@ H5File::~H5File() { try { close(); - } catch (Exception close_error) { + } catch (Exception& close_error) { cerr << "H5File::~H5File - " << close_error.getDetailMsg() << endl; } } |