begin_end_sequence
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| begin_end_sequence [2018/03/30 11:54] – wolfgangriedmann | begin_end_sequence [2019/08/29 17:57] (current) – wolfgangriedmann | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| So, if you are transporting VO code, you can keep these statements safely, but for new code please use the .NET equivalents [[trycatch|Try - Catch]]. | So, if you are transporting VO code, you can keep these statements safely, but for new code please use the .NET equivalents [[trycatch|Try - Catch]]. | ||
| Where the X# compiler adds functionality in the translation is in the recover statement, to support the VO '' | Where the X# compiler adds functionality in the translation is in the recover statement, to support the VO '' | ||
| + | Please see here for a detailled explanation: | ||
| The biggest difference between the error handling in .NET and Visual Objects stays in the ErrorBlock() handling. Please see the relative topic: [[vo_errorblock|The VO ErrorBlock]] | The biggest difference between the error handling in .NET and Visual Objects stays in the ErrorBlock() handling. Please see the relative topic: [[vo_errorblock|The VO ErrorBlock]] | ||
| - | Unfortunately, | + | The biggest difference is that in VO you can set a global error handler, and this is then called every time a runtime error is encountered, |
| - | < | + | |
| - | local uVal2 as usual | + | |
| - | local uVal3 as usual | + | |
| - | begin sequence | + | In .NET, if an exception is occurring, and there is no '' |
| - | uVal1 := " | + | |
| - | uVal2 := 2 | + | |
| - | uVal3 := uVal1 + uVal2 | + | |
| - | end sequence</ | + | |
| - | when executed in VO shows a runtime error, as expected. | + | |
| - | When you execute it in X#, it does not shows any runtime | + | |
| + | Therefore, in X# the presence of error handling is much more important than in VO. | ||
begin_end_sequence.1522410876.txt.gz · Last modified: 2018/03/30 11:54 by wolfgangriedmann