
You can add the unhandled exceptions of a selected block to the signature of the calling method in order to propagate them.
Example
| Before Execution | After Execution |
|---|---|
![]() To copy the source code example, click here Code Example Before Execution |
![]() |
| The selection contains two statments that can raise exceptions. cx_no_fuel and cx_failure have either to be handled inside the method or propagated by adding them to the method signature. For both cases, ABAP Development Tools (ADT) provides a quick assist. | The cx_failure and cx_no_fuel exceptions are added to the signature of the drive method. The exception will now be propagated to the caller of the drive method automatically at runtime. |
To propagate exceptions, proceed as follows: