User Tools

Site Tools


vo_errorblock

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
vo_errorblock [2019/08/29 17:50] wolfgangriedmannvo_errorblock [2019/08/31 14:46] (current) wolfgangriedmann
Line 6: Line 6:
 You can set a few default handlers for otherwise unhandled exceptions, but that is far away from the VO functionality. 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 the set handler is called by the runtime system only where a begin/end sequence is replaced.+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.
  
-For details please see the post by Robert v.d.Hulst: [[https://www.xsharp.info/forum/public-product/1418-dtawin-server-exceptions#10445|https://www.xsharp.info/forum/public-product/1418-dtawin-server-exceptions#10445]]+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: 
 +  * Incorrect usual additions throw an exception 
 +  * Most argument errors generate an exception 
 +  * VODb operations catch an exception (the RDD system reports errors through exceptions) and return FALSE on failure (and store the exception that occurred inside the RDD in the LastRddError of the runtime state). This mimics the behavior from VO where the last RDD error was stored in a structure that you could retrieve with a call to _VoDbErrInfoPtr(). This function now returns RuntimeState.LastRDDError. If the VoDb() operation is called from a Db..() function then either false is returned or the error handler is called, depending on what the VO function did. 
 +  * Low level file operations catch an exception and return either false or F_ERROR, set FError() and store the last exception that occured which can be retrieved with FException(). This is done through the method XSharp.IO.File.setErrorState(). 
 + 
 +For more details please see the post by Robert v.d.Hulst: [[https://www.xsharp.info/forum/public-product/1418-dtawin-server-exceptions#10445|https://www.xsharp.info/forum/public-product/1418-dtawin-server-exceptions#10445]]
  
vo_errorblock.txt · Last modified: 2019/08/31 14:46 by wolfgangriedmann