I was testing some new code for my mod, which was using an ACTION_TRY:VERSION ~beta 0010~
BEGIN ~prova~
SILENT
ACTION_TRY
COPY - ~setup-prova.tp2~ ~trash.bin~
REPLACE_EVALUATE "VERSION\( *\)~\( *\)\(b?e?t?a?\)\( *[a-z]* *\)\([0-9]+\)"
BEGIN
PATCH_IF (~%MATCH3%~ STRING_EQUAL_CASE ~beta~) AND (%MATCH5%<13) BEGIN
PATCH_VERBOSE
PATCH_FAIL ~old version~
END
END
"VERSION%MATCH1%~%MATCH2%%MATCH3%%MATCH4%%MATCH5%"
BUT_ONLY
WITH
~old version~
BEGIN
PRINT ~check~
ACTION_RERAISE
END
DEFAULT
PRINT ~version not detected. Press any key to abort or c to continue~
ACTION_READLN abort
ACTION_IF ~%abort%~ STRING_MATCHES_REGEXP ~c.?~ BEGIN
FAIL ~aborted~
END
END
VERBOSE
I expected it to fail with error text "old version" (due to the ACTION_RERAISE), or at least to print "check". But neither of the two actions after WITH were performed, and the installation was successful.
It behaved, though, as expected (performing the DEFAULT actions, prompting and, if the input was not c, FAILing with message ~aborted~), when I copied a non existing file instead of setup-prova.tp2.
Is it the expected behaviour for a FAIL command in a TRY action?