1 | procedure | Input | HDLR_ENTRY |
2 | token | Input | POINTER |
3 | fc | Output | FEEDBACK |
The Register a User-Written Condition Handler (CEEHDLR) API registers a user-written condition handler for the current call stack entry.
CEE0000 | The API completed successfully |
Severity: 00 | |
CEE0256 | Procedure already registered, registered again |
Severity: 10 | |
CEE0257 | The procedure provided for &1 is not valid |
Severity: 30 | |
CEE9902 | Unexpected user error occurred in &1 |
Severity: 30 |
CEEHDLR is implemented as a builtin and therefore cannot have its address taken or be called through a procedure pointer.
A queue of handlers is maintained for each call stack entry. The handlers are given control in LIFO order. That is, the handler most recently registered is the first one used for the call stack entry from which the call to CEEHDLR was made.
Any registered user-written condition handlers that were not unregistered by the Unregister a User-Written Condition Handler (CEEHDLU) API, are unregistered automatically by ILE upon removal of the associated call stack entry from the call stack. For more information on unregistering user-written condition handlers, see Unregister a User-Written Condition Handler (CEEHDLU) API.
The message CEE0257 occurs if the pointer contained in procedure is not a procedure pointer.
Following is a description of the interface that the system uses to communicate with ILE condition handlers.
1 | C_CTOK | Input | FEEDBACK |
2 | token | Input | POINTER |
3 | result_code | Output | INT4 |
4 | new_condition | Output | FEEDBACK |
None.
ILE condition handlers get control for all *ESCAPE, *STATUS, *NOTIFY, and function check messages. Not all result code actions are valid for all types of messages.
If the message is handled by the ILE condition handler, the result-code action is not performed.
If a result code is returned that is not valid, the following message occurs:
CEE0265 | The result code received from a condition handler is not valid |
Severity:30 |
Valid result codes are:
10 | Resume at the resume cursor, and handle the
condition, as follows:
|
20 | Percolate to the next condition handler. |
21 | Percolate to the next call stack entry. This can
skip a high-level language condition handler for this call stack entry. Any
remaining user handlers in the queue for this call stack entry also can be
skipped.
This handle cursor movement is in addition to any other handle cursor movement done explicitly in the handler, for example by the CEEMRCR API. The handle cursor is not moved past a call stack entry for a control boundary. The default condition handling actions are applied to the message. Default Responses to Unhandled Exceptions summarizes the default condition handling actions. |
30 | Promote to the next condition handler. |
31 | Promote to the next call stack entry. This may
skip a high-level language condition handler for this call stack entry. Any
remaining user handlers in the queue for this call stack entry also can be
skipped.
This handle cursor movement is in addition to any other handle cursor movement done explicitly in the handler, for example by the CEEMRCR API. The handle cursor is not moved past a call stack entry for a control boundary. The default condition handling actions are applied to the new message. Default Responses to Unhandled Exceptions summarizes the default condition handling actions. |
32 | Promote and restart condition handling with the first condition handler for the call stack entry at which the handle cursor currently points. |
Note: It is not valid to promote a condition without returning a new condition token. If the original condition is returned in new_condition, the following message occurs:
CEE0262 | The condition being promoted is not valid |
Severity:30 |
Top | ILE CEE APIs | APIs by category |