The C$JAVA library routine includes two op-codes for handling exceptions that are thrown by Java: CJAVA-EXCEPTIONOCCURRED and CJAVA-GETEXCEPTIONOBJECT.
CJAVA-EXCEPTIONOCCURRED is returned by any call to C$JAVA that returns a status value, but during which an exception was thrown.
CJAVA-GETEXCEPTIONOBJECT returns the exception object of the last exception thrown. Once the exception object is returned, you can call any of the methods on the exception object that are documented in the Java documentation.
In addition, exception information is now written to stderr or the error file specified by the "-le" command line option when a Java exception occurs. This information is formatted like a normal Java stack trace.