Update content

This commit is contained in:
danrega
2023-02-20 15:15:20 +01:00
parent 6e77a42de0
commit bfa9df1845
4 changed files with 7 additions and 7 deletions

View File

@@ -571,7 +571,7 @@ Regarding the exiting of procedures, note the hint mentioned above. The use of `
- As mentioned, there are predefined exception classes like `CX_SY_ZERODIVIDE` for divisions by zero. However, you can create your own exception classes so that you can react on issues that are specific to your ABAP program. The exception class must, as stated above, be derived from one of the three abstract classes:
- `CX_STATIC_CHECK`: For forcing users to handle exceptions.
Generally speaking, exceptions that can occur in procedures should be handled locally there in the implementation or be declared explicitly in the [procedure interface](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenparameter_interface_glosry.htm) so that a caller knows which error situations can be expected. Exception classes of type `CX_STATIC_CHECK` enforce this. A check is carried out statically at compile time. Users of a procedure are then forced to either handle the exception locally in a `TRY` control structure or the users declare the exception themselves in their procedure interface to propagate the exception to their users. If this is not the case, a warning is produced.
- As an example, a method signature might look as follows. The addition `RAISING` in method signatures are used to declare one or more class-based exceptions that can be propagated from the method to the caller.
- As an example, a method signature might look as follows. The addition `RAISING` in method signatures is used to declare one or more class-based exceptions that can be propagated from the method to the caller.
- When users of this method implement the method, they are made aware of the fact that an error situation can occur and a particular exception can be raised. The assumption is that `CX_SOME_ERROR` is derived from `CX_STATIC_CHECK`. Users of the method should then prepare the code accordingly.
```abap
"Method definition using the RAISING parameter