You can remove an entire TRY CATCH statement if you no longer want to handle the exceptions.
Example
Before Execution | After Execution |
---|---|
To copy the source code example, click here Code Example Before Execution |
|
In the implementation of the drive method, the cx_no_fuel and cx_failure exceptions are handled. The TRY CATCH statement should now be removed because the exceptions are no longer to be handled. |
In the drive method, the TRY CATCH statement – including the CATCH blocks – is removed. Only the content of the former TRY block remains. |