Application Security Testing: An Integral Part of DevOps

The can be found in System.Runtime.ExceptionServices namespace and is used to an that occurs at a point, and it can be thrown later using the ExceotionDispatchInfo.Throw method.

See below for an example.

ExceptionDispatchInfo exceptionDispatchInfo = null;  
     //code that throws error 
catch (Exception ex) 
     exceptionDispatchInfo = ExceptionDispatchInfo.Capture(ex); 

At a later point in time, you could use the Throw method to throw it, exceptionDispatchInfo.Throw();


Visit the DevX Tip Bank


Source link


Please enter your comment!
Please enter your name here