Fj-Java-Error Class - Fujitsu J Adapter Class Generator User Manual

Fujitsu user's guide j adapter class generator
Table of Contents

Advertisement

50
Chapter 5. Adapter Class Reference

FJ-JAVA-ERROR class

The adapter class generates the exception object when some error is detected
during execution period. The FJ-JAVA-ERROR class is the class of that exception
object. The exception message, exception type and exception information of Java
can be acquired by using the FJ-JAVA-ERROR class method.
Refer to "Fujitsu NetCOBOL User's Guide" for details of the exception processing.
The FJ-JAVA-ERROR class has the following methods.
Methods that Acquire Exception Information
Method name
GET-MESSAGE
GET-CODE
GET-EXCEPTION
GET-MESSAGE method (object method)
Explanation
Returns the exception message. It is used to indicate the error content.
Syntax
INVOKE EXCEPTION-OBJECT "GET-MESSAGE" USING
messageLength
Parameter and return value
message (attribute: PIC X ANY LENGTH)
Specifies the data item that stores the exception message.
messageLength (attribute: PIC S9(9) COMP-5)
Length (number of bytes) of the exception message is returned.
GET-CODE method (object method)
Explanation
Returns the type of exception.
Syntax
INVOKE EXCEPTION-OBJECT "GET-CODE" RETURNING
Parameter and return value
code (attribute: PIC S9(9) COMP-5)
Type of exception is returned.
Type
Function
Object
Returns the exception message.
Object
Returns the type of exception
Object
Returns the Java exception information.
message
RETURNING
code

Advertisement

Table of Contents
loading

Table of Contents