summaryrefslogtreecommitdiffstats
path: root/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-08-06 14:15:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-08-06 14:15:08 (GMT)
commitca7d4f85a5054fc406e62ccb009169e139f0105c (patch)
tree719110c38ca5d62a2a688a6598b2a734e17a63cd /java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
parent762c14fde587f2ff4f9b9cdaa6b2232a481edde4 (diff)
downloadhdf5-ca7d4f85a5054fc406e62ccb009169e139f0105c.zip
hdf5-ca7d4f85a5054fc406e62ccb009169e139f0105c.tar.gz
hdf5-ca7d4f85a5054fc406e62ccb009169e139f0105c.tar.bz2
HDFFV-10544 exception variable as local class
Diffstat (limited to 'java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java')
-rw-r--r--java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
index 5ae977d..ad5c2ab 100644
--- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
+++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java
@@ -30,6 +30,9 @@ import hdf.hdf5lib.HDF5Constants;
@SuppressWarnings("serial")
public class HDF5LibraryException extends HDF5Exception {
+ private final long majorErrorNumber;
+ private final long minorErrorNumber;
+
/**
* Constructs an <code>HDF5LibraryException</code> with no specified detail
* message.
@@ -44,9 +47,10 @@ public class HDF5LibraryException extends HDF5Exception {
}
catch (Exception e) {
}
- ;
- detailMessage = getMinorError(getMinorErrorNumber());
+ this.majorErrorNumber = _getMajorErrorNumber();
+ this.minorErrorNumber = _getMinorErrorNumber();
+ detailMessage = getMinorError(minorErrorNumber());
}
/**
@@ -65,7 +69,8 @@ public class HDF5LibraryException extends HDF5Exception {
}
catch (Exception e) {
}
- ;
+ this.majorErrorNumber = _getMajorErrorNumber();
+ this.minorErrorNumber = _getMinorErrorNumber();
}
/**
@@ -74,7 +79,11 @@ public class HDF5LibraryException extends HDF5Exception {
*
* @return the major error number
*/
- public native long getMajorErrorNumber();
+ public native long getMajorErrorNumber()
+ {
+ return majorErrorNumber;
+ }
+ private native long _getMajorErrorNumber();
/**
* Get the minor error number of the first error on the HDF5 library error
@@ -82,7 +91,11 @@ public class HDF5LibraryException extends HDF5Exception {
*
* @return the minor error number
*/
- public native long getMinorErrorNumber();
+ public native long getMinorErrorNumber()
+ {
+ return minorErrorNumber;
+ }
+ private native long _getMinorErrorNumber();
/**
* Return a error message for the minor error number.