Course info
Apr 17, 2012
1h 17m

The Exception Handling Application Block is a powerful framework that makes the common task of working with exceptions and changing exception handling policies simple and easy to maintain. If you are tired of seeing try/catch blocks and logging statements all throughout your exception handling code, this course will help you clean up that code! In this course we will learn how to use the Microsoft Enterprise Library's Exception Handling Application Block. We start off by learning a bit about the block and some common exception handling strategies. We will also learn how to configure the Exception Handling Block, and how to use it for common exception handling strategies such as wrapping, replacing and logging. Finally, we will cover using the block in a WCF application and learn how to create custom Exception Handlers.

About the author
About the author

John Sonmez is the founder of Simple Programmer (, where he tirelessly pursues his vision of transforming complex issues into simple solutions

More from the author
Beginning Lua
2h 50m
2 Dec 2013
Beginning HTML 5 Game Development With Quintus
2h 52m
25 Oct 2013
Beginning HTML5 Apps For Firefox OS
2h 20m
17 Oct 2013
More courses by John Sonmez
Section Introduction Transcripts
Section Introduction Transcripts

Block Overview and Configuration
John Sonmez: Hi. This is John Sonmez from Pluralsight, and in this module we are going to go over the exception-handling block, as part of the Microsoft enterprise library; and we are also going to see how to configure that block. Specifically, in this module, we are going to try and understand a little bit more about exceptions and how exceptions are used in our applications, so that we can better understand the usages of the block and what problem the block is trying to solve for us. Then we're going to go into a little bit of the details of what the block does, and we'll see how to configure that block. And in the upcoming modules, we'll actually use the block and see how to actually use the block in our application code, and then to even build some custom exception handlers, and to use the exception-handling block in our WCF applications.

Simple Exception Handling
John Sonmez: Hi, this is John Sonmez from Pluralsight and in this module we are going to be going over some simple Exception Handling strategies and scenarios using the Microsoft Enterprise Library Exception Handling Block. In the previous module, we'd gone over the configuration of this block and we talked about what the block can do for us and when we might be able to use it. But in this module, we are going to actually get into the code and start using the block for some common scenarios. We're going to start off by getting our project setup to use the Exception Handling Block and we're going to see what the most basic scenario looks like. Then we're going to go into our configuration and we're going to change things around a little bit and we're going to see how we can wrap an exception, followed by replace an exception, we're going to use the logging configuration, and then we'll get into handling an exception more specifically in our code by having the Exception Handling Block tells us whether or not we need to rethrow an exception, and then finally we're going to see how we can pass in a special instance ID so that exceptions can be correlated in the different parts of the application. So let's go ahead and get started and dive right in to using the Exception Handling Block.

WCF and Custom Handlers
Hi, this is John Sonmez from Pluralsight. And in this module we are going to be discussing Windows Communication Foundation and creating custom exception handlers in the Microsoft enterprise library exception handling block. So, so far we have talked about the exception handling block and we've used the exception handling block in some general purpose cases inside of our code. But in this module we're going to see how we can use it in WCF apps and we're going to see how we can take exceptions and map them to WCF fault contracts which will allow us to make sure that we shield exception details from a user and makes it a little bit easier for us to create exception handling schemes in our Windows Communication Foundation applications. We'll also take a look in this module at creating a custom exception handler. So, so far we had used built in exception handlers but there's no reason why we can't create our own and it's actually pretty easy for us to be able to do.