Product Information > JADE Object Manager Guide > Chapter 3 - JADE Application Programming Interface (API) > pResultParam

pResultParam

The method should set the pResultParam parameter, to indicate the action to be followed by the method that caused the exception. The actions are:

The continue execution action attempts to continue the execution (in the next instruction) of the method that caused the exception. The resume execution action attempts to resume the execution (in the next instruction) of the method that caused the exception or of the method that armed the exception handler.

The abort execution action aborts all methods currently executing in the kernel stack; that is, all methods invoked by the JADE Object Manager kernel. The outermost caller receives the JOM_METHOD_ABORTED result to the last call to the JADE Object Manager that caused the error.

The exception handler can also indicate that the next available handler for this class of exception should be executed, leaving the decision of resuming or aborting the method that caused the exception to that handler.

If the last global exception handler indicates the execution of the next available exception handler, the error code is returned as the result of the JADE Object Manager call that caused the exception.

The pResultParam parameter values are listed in the following table.

Value Constant Action
0 E_CONTINUE

Processing continues as if no error had occurred. The JADE Object Manager API call that caused the exception ultimately returns a zero (0) result to the user application.

Use this return mode only in circumstances when you are certain that continuing the code execution will still be correct after ignoring the exception.

For lock exceptions, use this return mode only if the lock has been successfully retried. If the lock exception occurred while updating, ensure that the transaction has not been aborted by the exception handler before using E_CONTINUE.

1 E_ABORT_ACTION Aborts the current action. The JADE Object Manager message stack is cut back, and control returns to the user application, with the JADE Object Manager API call that caused the exception returning a JOM_METHOD_ABORTED result.
2 E_RESUME_NEXT The JADE Object Manager message stack is cut back to the method that armed the exception handler, and the JADE Object Manager API call that caused the exception returns a zero (0) result.
    If there were no JADE Object Manager messages on the stack when the handler was armed, the effect of the E_RESUME_NEXT is identical to that of E_ABORT_ACTION.
-1 E_PASS_BACK Passes control back to any previously armed exception handler for this type of exception. If there are no other applicable handlers, the JADE Object Manager message stack is cut back, and control returns to the user application, with the JADE Object Manager API call that caused the exception returning a non zero result representing the error condition.

Your external methods should make provision for an abort action. The JADE Object Manager kernel cuts the C++ stack, by issuing a throw statement. Your resource clean up code should be given guaranteed execution, by means of destructors or by catching all C++ exceptions and rethrowing them on clean up completion.

Exceptions can occur automatically because of error conditions found by the kernel or they can be created manually and passed to the jomRaiseException entry point. (For details, see "Raising an Exception", later in this chapter.) It is the responsibility of the exception handler to abort the current transaction, if required.