Try - Catch

Symbol

Try - Catch can be used to produce structured processing of exceptions / errors.

The commands are first executed in the try block.

If an exception occurs, the control flow is immediately diverted to the catch block with the exception object as a parameter.

If an exception is not caught by any catch block, it will be passed on to the next higher level.

 

There are no parameters to be set for Try - Catch instructions.

 

Items from the source table are to be entered as the system line items (ANLGPOS table) in the target table.

If the source data field type is not the same as the field type in the target table, the values cannot be entered. This error situation can be caught by a Catch instruction. In the example, a Log message is generated in the Catch instruction. This can be useful for troubleshooting / correction.