Tag Archives: exception handling

How exception filters can help you investigate runtime errors in C#

By | July 2, 2016

Exception filters are not new. Its been there for a long time (at least for than a year) as it is been released with .NET framework 6.0. But I do see developers don’t know the basic advantages of using exception filters and use code inside catch to determine problems. Let us look how exception filters can help you… Read More »

Simplest way of creating custom exceptions in .NET using Visual Studio 2015

By | January 1, 2015

.NET framework supports all kinds of exception types which are sufficient for most of the code bases, in some cases it may require to define custom exceptions in our applications. These may be just because of manage the overall exception handling in a simple way,  make the code more readable with respect to solution or even in some cases… Read More »

Conditional Exception Handling – Exception Filters in C# 6.0

By | December 8, 2014

C# 6.0 has two changes for exception handling. In the previous post we have discussed about Using await in a catch or finally block – in C# 6.0 , and the another one is the filtering the exception. While Using await in a catch or finally block is a welcome change for developers, we can consider exception filter is… Read More »

Using await in a catch or finally block – in C# 6.0

By | December 6, 2014

Using Async methods are very common now a days and while working with  async and await,  you may have experienced that you want to put some of the result awaiting either in a catch or finally block or in both. Consider a scenario, when there is an exception  and you want to log information into file or sending a service call… Read More »

CorruptedStateExceptions in .NET, a way to handle

By | September 23, 2013

It is already a well known fact that while running the MSIL , the CLR (runtime) can generate an Exception object automatically because of some unknown problem it faced while executing the code. These exceptions could be an User mode Exceptions which could have been rose by some bad application code or can also be a Structured Exception… Read More »