You cannot analyze an error in an automation call until after the synchronization point. The following example illustrates the problems that this can cause:
Suppose you call the methods
set_registered_events
,
add_column
,
add_nodes_and_items
, and
expand_nodes
one after the other.
The method call for
add_nodes_and_items
contains an error.
Now you synchronize the automation queue using the method
cl_gui_cfw=>flush
.
This sends the automation queue to the frontend and processes it.
The first two methods are processed with no problems.
However, in the third method, an error occurs. Once the error occurs, the automation queue processing is terminated, and an error is returned to the backend.
The exception
cntl_error
of method
cl_gui_cfw=>flush
is triggered.
Consequently, you cannot immediately identify the method in which the error occurred.
In this case, you should use the
Debugger and select the setting Automation Controller: Always process requests synchronously. You will then be able to see that the error is triggered in the method
add_nodes_and_items
.