Function documentationProgramming Exceptions (BOR) Locate this document in the navigation structure

 

You implement exceptions within a method, that is within the macro instructions BEGIN_METHOD <Methode> and END_METHOD, using the macro instruction EXIT_RETURN.

EXIT_RETURN <Code> <Variable1> <Variable2> <Variable3> <Variable4>.

You must declare <Code> with the type SWOTINVOKE-CODE. For Code, enter the exception’s four-digit number specified when the exception was defined. The variables (maximum of four) are derived from the definition of the message that is linked to the exception.

Example Example

For examples of implementing exceptions, see Implementation of Method ExistenceCheck.

End of the example.
Standard exceptions

As an alternative to the exceptions defined for the method and raised with the EXIT_RETURN macro described above, you can also use one of the macro instructions below to leave the program in the event of exception situations.

Caution Caution

You cannot model in a workflow definition for the exceptions you implement with the macro instructions below because they do not appear there for selection.

End of the caution.

EXIT_OBJECT_NOT_FOUND

Object not found

Do not use this macro instruction in implementation of the method ExistenceCheck.

EXIT_CANCELLED

Canceled by user

If the method executed in a work item raises this exception, the work item is not yet completed. Instead it retains the status In process and can be executed again.

EXIT_NOT_IMPLEMENTED

Method not implemented

EXIT_PARAMETER_NOT_FOUND

Mandatory parameter not found

You can only use the macro instructions above within BEGIN_METHOD - END_METHOD.