summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/test/TestH5E.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java
index d1f50cc..656069a 100644
--- a/java/test/TestH5E.java
+++ b/java/test/TestH5E.java
@@ -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();