Loading...
Select Version
This function removes any pending exception.
It is equivalent to the JNI function ExceptionClear
.
Call
CALL 'JCI_ExceptionClear'
Return value (RETURN-CODE)
JCI-RET-OK
The call was successful.
Notes
This function may also be called when no Java VM has been started or no exception is pending.
Example
DATA DIVISION. WORKING-STORAGE SECTION. COPY JCI-TYPEDEFS. 01 JCIConstants. COPY JCI-CONST. ... 01 className. 02 PIC S9(9) USAGE COMP-5 VALUE 30. 02 PIC X(30) VALUE 'hello'. ... 01 classObj TYPE JCI-object. ... PROCEDURE DIVISION. ... CALL 'JCI_FindClass' USING className classObj IF RETURN-CODE NOT = JCI-RET-OK CALL 'JCI_ExceptionCheck' IF RETURN-CODE = JCI-RET-TRUE CALL 'JCI_ExceptionDescribe' CALL 'JCI_ExceptionClear' END-IF ELSE ... END-IF. ...
If the hello class does not exist, the output looks roughly as follows:
Exception in thread "main" java.lang.NoClassDefFoundError: hello Caused by: java.lang.ClassNotFoundException: hello at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:332) at java.lang.ClassLoader.loadClass(ClassLoader.java:358)