The code specifically spells out that this is handled differently, so it is intentional, probably because SYNTAX does not really function like an EXIT or RETURN but is a terminating condition. It differs in one key aspect in that the condition is trappable by the code activation that raises the SYNTAX error, where with the other conditions, the current activation level is terminated and the trapping can only occur at the caller's level. This needs to be more clearly spelled out in the description of the RAISE instruction.
Anonymous
I could just update rexxref, but I'm wondering ..
Why should RAISE SYNTAX behave differently?
I'd never expect the currently executing routine/method to trap a raised condition, but always the caller.
If we allow RAISE SYNTAX to raises in the currently executing routine/method it surely must not accept an EXIT or RETURN option