Skip to main content

Error Checking

Error Checking

The Java Gateway provides error checking as follows:

  • When an error occurs while executing Ensemble proxy methods, the error is, in most cases, a Java exception, coming either from the original Java method itself, or from the Java Gateway engine. When this happens, a <ZJGTW> error is trapped.

  • Java Gateway API methods like %Import() or %Connect() return a typical Ensemble %StatusOpens in a new tab variable.

In both cases, Ensemble records the last error value returned from a Java class (which in many cases is the actual Java exception thrown) in the local variable %objlasterror.

You can retrieve the complete text of the error message by calling $system.OBJ.DisplayError(), as follows:

 Do $system.OBJ.DisplayError(%objlasterror)
Purpose of this instance: Draft documentation
DocReleaseID: Core2018.1.11
Content loaded from:
/staging/ce/2018.1.11/doc/cache/en-us/src/
/staging/ce/2018.1.11/doc/ensemble/en-us/src/
/staging/ce/2018.1.11/doc/isp/en-us/src/
/staging/learning/zenmojo-doc/en-us/src/
FeedbackOpens in a new tab