fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: begin - end sequence compatibility

begin - end sequence compatibility 1 year 2 months ago #4473

  wriedmann's Avatar Topic Author wriedmann Offline Posts: 1545
Hi,

please see this piece of code:
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
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Last edit: by wriedmann.

begin - end sequence compatibility 1 year 2 months ago #4474

  Chris's Avatar Chris Offline Posts: 1137
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
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

begin - end sequence compatibility 1 year 2 months ago #4475

  wriedmann's Avatar Topic Author wriedmann Offline Posts: 1545
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.
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

  • Page:
  • 1