finally_exception_handling_clean_up_.htm
FINALLY
statements
FINALLY | Clean up exception handling |
statements | Any valid language statement |
FINALLY is used to clean up any exception handling initiated by TRY.
If there is no exception inside the TRY section, control directly transfers to the FINALLY statement. Statements following FINALLY are always executed. If an exception is encountered, statements following any CATCH structure will be processed prior to FINALLY.
It is not recommended to transfer control out of a FINALLY section using BREAK, RETURN or GOTO.
Example:
CODE
TRY
F() !calling a function
CATCH (Exception e)
MESSAGE('Exception in code: ' & e.Message)
FINALLY
!Any cleanup code here
END
See Also: CATCH (trap exception)
finally_exception_handling_clean_up_.htm.txt · Last modified: 2021/04/15 12:48 by 127.0.0.1