Programming Exceptions (BOR)
Use
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.
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.
|
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.