Blog Header Menu

Wednesday, December 30, 2015

C#: Recursive Read Exception along with Inner Exception

this blog demonstrates how to log the exception message along with n depth of innerexception in C#. the better logging always helps to developer to find out the optimal solution for problem.

Here is  a recursive method to log exception along with inner exception :

C# : 


C#: Recursive Read Exception along with Inner Exception

the above LogInnerException method  recursively log the inner exception untill it reach to NULL.

C# : 

C#: Recursive Read Exception along with Inner Exception

above readException method reads the exception as well as aggregateException message too.

Thanks for Visiting !!

No comments:

Post a Comment