Migration EntLib 1.1 to 5.0: Exception Handling

Topics: Exception Handling Application Block
May 2, 2011 at 11:58 AM

Hello,

I am upgrading my web application from .NET 1.1 to .NET 4. In this process, I also intend to upgrade the EntLib version used from 1.1 to 5. I have a query regarding the Exception Handling Block which is the only block that is used in the code. There is a custom class (EmailExceptionPublisher) that implements IExceptionPublisher. This class implements the Publish() method where it receives the exception, additionalInfo and configsettings as parameters. The method constructs an e-mail with this information and sends it to the application administrator.

When upgraded to Entlib 5, I have a new custom class that now implements IExceptionHandler. I have the HandleException() method here which is supposed to do the same work. However, I don't understand as to how can I get hold of the additionalInfo (existed as a nameValueCollection earlier) to build my mail message. Could you please help me ?

Regards.

May 3, 2011 at 4:30 AM
Edited May 3, 2011 at 5:52 AM

Hi,

I'm not aware how huge are the changes from 1.1 to 5 but can you check if exception.Data.Add() fits your requirement? Basically, this adds additional details on the current exception.

 

Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com