HDFFV-9739 Grab err number before API call

This commit is contained in:
Allen Byrne
2018-05-16 15:02:43 -05:00
parent 84f1bf6eb1
commit 37e4607b91
+6 -4
View File
@@ -78,14 +78,15 @@ public class TestH5E {
H5.H5Fopen("test", 0, 1);
}
catch (HDF5LibraryException hdferr) {
long errnum = hdferr.getMajorErrorNumber();
int[] error_msg_type = { HDF5Constants.H5E_MAJOR };
String msg = null;
try {
msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(), error_msg_type);
msg = H5.H5Eget_msg(errnum, error_msg_type);
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Eget_msg: " + err);
fail("H5.H5Eget_msg(Throwable): " + err);
}
assertNotNull("H5.H5Eget_msg: " + msg, msg);
assertEquals("H5.H5Eget_msg: ", "Object atom", msg);
@@ -93,7 +94,7 @@ public class TestH5E {
}
catch (Throwable err) {
err.printStackTrace();
fail("H5.H5Eget_msg: " + err);
fail("H5.H5Eget_msg(Other): " + err);
}
}
@@ -103,10 +104,11 @@ public class TestH5E {
H5.H5Fopen("test", 0, 1);
}
catch (HDF5LibraryException hdferr) {
long errnum = hdferr.getMinorErrorNumber();
int[] error_msg_type = { HDF5Constants.H5E_MINOR };
String msg = null;
try {
msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(), error_msg_type);
msg = H5.H5Eget_msg(errnum, error_msg_type);
}
catch (Throwable err) {
err.printStackTrace();