Posts

Showing posts from April, 2022

How to Bubble Up Exception Information? : Easily Explained with Examples

Image
  You might have come across situations where we have to offload execution of some tasks to some other thread so that it can be done in the background. When this child thread is executed there might be situations where it throws exception and often these exceptions is unknown to the caller thread or the main thread. In those cases we need to bubble up the exception which is occurring in the child thread to the parent where it can be handled. What is meant by Bubble Up Exception Information? Bubbling up in simple terms can be related to the Air bubbles which makes its way to the surface from the bottom. In our case we are referring to the exception which occurs in the child thread to make its way up to the main thread where all the exceptions can be handled gracefully.  There are different ways by which we can bubble up the exception information from the child thread to the main thread. In .Net 4.0 and above we can use Task through which it is much easier to achieve this as shown below:

How to Autogenerate Dump File using Windows Error Reporting : Easily Explained with Examples

Image
  As Developers we might have faced situations wherein the application crashes and we are tasked to find out the reason for the crash. It can be quite challenging at first to identify the root cause of the crash. It can be anything from reading invalid memory location, or accessing memory which has already been de-allocated. What is a Dump File? Dump File is a file which gets generated by the Debugging engines which contains/embed information related to the state of the application during failure/crash to which the debugger is attached to.  Dump files generated from these crashes serve as an important resource to identify the root cause with the help of call stack and associated information contained within the file. Ways of Generating Dump Files It can be generated manually from the Task Manager while the process is running by clicking on Create Dump File option from the context menu of the process as shown below:                                 Dump File can also be generated using a