The VO ErrorBlock() function gives the possibility to set a global error handler. Unfortunately, in .NET this is not more possible as the CLR (the Common Language Runtime) does not supports such a feature.
In a .NET application you need to make extensive use of
try - catch blocks and use the relative exceptions to react to runtime errors.
You can set a few default handlers for otherwise unhandled exceptions, but that is far away from the VO functionality.
For compatibility, the ErrorBlock() function is there, but is not called by the .NET runtime, but it is called in the VO SDK classes. They call the ErrorBlock() function from the RECOVER blocks in the error handlers on several places. And the ErrorBlock is called inside the DB…() functions when an error occurs.
On all other places in the runtime either a normal .net exception is thrown, or the exception is catched and a FALSE returned. For example:
For more details please see the post by Robert v.d.Hulst: https://www.xsharp.info/forum/public-product/1418-dtawin-server-exceptions#10445