Handling inner exceptions

Topics: Exception Handling Application Block
May 14, 2009 at 6:52 PM

Hi

I am using enterprise library v2.0 and I am learning how to log exceptions with the exception handling block.

I was just wondering how the exception handling block handled exceptions that have inner exceptions. Does it iterate through the exceptions to find the innermost exception to display the information about that exception or does it display the outer exception. I will investigate this myself but I don't really know much about exceptions and wrapping exceptions.

Thanks

May 14, 2009 at 9:15 PM

Hi andieje, the AB dose not check for inner exceptions

 

 

Regards

 

juan Pablo schmiede

May 15, 2009 at 7:11 AM

Hi,

As I've understand, wrapping exception is creating a new exception of a certain type and the original exception will be the inner exception of the new exception. For more details, http://msdn.microsoft.com/en-us/library/dd139928.aspx

Valiant Dudan
Global Technology & Solutions
Avanade, Inc.

entlib.support@avanade.com

May 21, 2009 at 12:48 PM

If the EHAB does not check for inner exceptions, how do i get to them using the ehab?

many thanks

May 22, 2009 at 3:19 AM

You have to create your own custom exception handler and process the inner exception within the HandleException method.  Adding a New Exception Handler - http://msdn.microsoft.com/en-us/library/dd140058.aspx

 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.

entlib.support@avanade.com