xsharp.eu • begin - end sequence compatibility
Page 1 of 1

begin - end sequence compatibility

Posted: Fri Mar 30, 2018 12:02 pm
by wriedmann
Hi,

please see this piece of code:

Code: Select all

local uVal1 as usual
local uVal2 as usual
local uVal3 as usual

begin sequence  
  uVal1 := "Hi"
  uVal2 := 2
  uVal3 := uVal1 + uVal2
end sequence
When executed in VO, it shows a error, as everyone would expect. But since the code error is occuring in a sequence, the program execution will continue.
When this code is executed in X# with the Vulcan runtime, it shows not error, but continues after the end sequence statement.

This will be a major issue for me as I'm using such constructs a lot, leaving the errorhandling to the globally installed error handler.
I understand that .NET does not supports global error handlers, but IMHO the compiler should try to insert something like a error handler in the own runtime, and execute it in such cases.
Wolfgang

begin - end sequence compatibility

Posted: Fri Mar 30, 2018 2:04 pm
by Chris
Hi Wolfgang,

So you would like something like the compiler (optionally of course!) automatically inserting a RECOVER USING block (if you have not supplied one) which displays an error message with info about the exception? I think that's doable.

But there's not much that this can do, apart from displaying the error message and have a Continue and an Abort option. Continue would continue execution after the END SEQUENCE (just like it does now), and Abort would terminate the app. Is this what you are looking for?

Chris

begin - end sequence compatibility

Posted: Fri Mar 30, 2018 2:10 pm
by wriedmann
Hi Chris,

yes, this would be the best option. But it should be a compiler option.

Thank you very much!

Wolfgang

P.S. Today I have made another big step forward with my VO migration - I have solved an issue with the ADS SQL data access. This error was hidden by the begin - end sequence, but now it is solved.