I found the following behaviour using a try-finally block:
A return statement in the try block skips the execution of the finally block.
Is this intented behaviour in CONTROL? Normally I would expect the finally block to always execute.
To reproduce just create a new panel and add a PUSH_BUTTON with the following Clicked event:
Code: Select all
main(mapping event)
{
try
{
PUSH_BUTTON1.enabled = false;
return;
}
finally
{
PUSH_BUTTON1.enabled = true;
}
}