Commit f727de65 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

Fix compilation error on old/new hdf5 api

parent 217ab216
......@@ -21,6 +21,11 @@
namespace uns {
#if ((H5_VERS_MINOR==8 && H5_VERS_RELEASE>=13)||(H5_VERS_MINOR>8))
#define PRINT_ERROR error.printErrorStack();
#else
#define PRINT_ERROR error.printError();
#endif
// ----------------------------------------------------------------------------
// READING constructor
......@@ -563,7 +568,7 @@ bool CSnapshotGadgetH5In<T>::loadCommonDataset(std::string tag, std::vector<U> &
}
catch (int e) {
if (this->verbose) {
std::cerr << "WARNING !!! : error while loadCommonDataset....\n";
std::cerr << "WARNING !!! : error while loadCommonDataset....\n";
}
data.clear();
}
......@@ -942,50 +947,30 @@ bool CSnapshotGadgetH5Out<T>::saveCommonDataset(std::string comp,std::string tag
// catch failure caused by the H5File operations
catch( FileIException error )
{
#if H5_VERS_MINOR<8
error.printError();
#else
error.printErrorStack();
#endif
throw -1;
PRINT_ERROR;
throw -1;
}
// catch failure caused by the DataSet operations
catch( DataSetIException error )
{
#if H5_VERS_MINOR<8
error.printError();
#else
error.printErrorStack();
#endif
throw -1;
PRINT_ERROR;
throw -1;
}
// catch failure caused by the DataSpace operations
catch( DataSpaceIException error )
{
#if H5_VERS_MINOR<8
error.printError();
#else
error.printErrorStack();
#endif
throw -1;
PRINT_ERROR;
throw -1;
}
// catch failure caused by the DataSpace operations
catch( DataTypeIException error )
{
#if H5_VERS_MINOR<8
error.printError();
#else
error.printErrorStack();
#endif
throw -1;
PRINT_ERROR;
throw -1;
}
catch( GroupIException error )
{
#if H5_VERS_MINOR<8
error.printError();
#else
error.printErrorStack();
#endif
PRINT_ERROR;
return -1;
}
catch (...) {
......@@ -1329,5 +1314,3 @@ template class GH5<float>;
//extern template class GH5<double>;
template class GH5<double>;
} // end of namespace
......@@ -18,8 +18,7 @@
#define UNSIO_MAJOR "1"
#define UNSIO_MINOR "3"
#define UNSIO_PATCH "0"
#define UNSIO_EXTRA "-dev-May-29-2019"
#define UNSIO_PATCH "1"
#define UNSIO_EXTRA ""
#endif // UNS_VERSION_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment