In the first form, SessionException constructs a SessionException object with the specified error code and error reason code. The resulting exception error message string (available using a java.lang.Throwable.getMessage call) contains the following: {error code description} - {error reason code description available via
errorReasonDescr}. For example, if a
startTrans method throws an exception due to the interface calls being out of sequence, the error message string is: “JCLI transaction startup failed - Interface calls are out of sequence”. The SDK (Java) uses this form of the SessionException constructor to report all errors with an error reason code other than SessionException.RULEFAILED (3091).
In the second form, SessionException constructs a SessionException object with the SessionException.CALLRULE_FAILED (11) return code, a SessionException.RULEFAILED (3091) error reason code, and a specified error message. The resulting exception error message string (available using a java.lang.Throwable.getMessage call) contains the following: {error code description} - {ruleErrorText}. For example, if a
call("MYRULE"...) throws an exception because the MYRULE rule encountered an access error on table named MYTABLE, the error message string is “JCLI rule call failed - Access error on TABLE "MYTABLE"”. The error reason code for these errors is always SessionException.RULEFAILED (3091). The SDK (Java) uses this form of the SessionException constructor to report rule failures, passing the string available via endMessage at the end of the call as a
ruleErrorText parameter.
Use the reasonCode method to retrieve the value of a particular error reason code.
Use the errorReasonDescr method to retrieve a textual description of a particular error reason code.
Returns an SDK (Java) operation error code.