EXITTRY

Exit a TRY statement

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
EXITTRY

The EXITTRY statement exits the current TRY-CATCH level. For example, if you have an EXITTRY in a TRY-CATCH block within another TRY-CATCH block, the EXITTRY exits one level.

EXITTRY can only be present within a TRY block; it is not allowed in a FINALLY block.

subroutine s1
    param       ,i
record
    x           ,i4
proc
    try
      begin
        x = param
        if (param .eq. 5)
          exittry               ;Will transfer control to "x = 6" below
        x = 2
        end
    catch (e)
        x = 5
    endtry
    x = 6
end