ILE RPG Programmer's Guide
Getting information about exceptions thrown by called Java methods
When RPG calls a Java™ method
that ends with an exception, RPG handles the Java exception and signals escape message RNX0301.
This message has the string value of the Exception, but it does not
have the trace information that is normally available when Java calls a method that ends with
an exception.
If you want to see the Java exception
trace information, do the following:
- ADDENVVAR ENVVAR(QIBM_USE_DESCRIPTOR_STDIO) VALUE('Y')
Note:
This step must be done before the JVM is started.
- Ensure that the os400.stderr option in your SystemProperties.default
file is set to file:myfilename, for example os400.stderr=file:/home/mydir/stderr.txt.
See Controlling how the Java Virtual Machine is set up.
Note:
This step must be done
before the JVM is started.
- ADDENVVAR ENVVAR(QIBM_RPG_JAVA_EXCP_TRACE) VALUE('Y')
Note:
This step can be done at any time. To stop the exception
trace being done by RPG, you can remove the environment variable,
or set it to a value other than 'Y'.
- After the exception has occurred, the trace information will be
in the file that you specified in the os400.stderr option.
[ Top of Page | Previous Page | Next Page | Contents |
Index ]