Creating a policy that will manage SqlExceptions?

Topics: General discussion
Dec 9, 2011 at 4:43 PM

In web.config, how can I create a policy that will just manage SqlExceptions?

Once I create it, how can I set that policy to send those sqlexceptions to a sink (flat file or an email)?

Thanks.

Dec 9, 2011 at 10:56 PM

Out of the box, Enterprise Library does not support an Exception Handler to handle SqlExceptions.  

You are going to have to write one yourself or find someone whose written one already...luckily someone already has.  :)

Take a look at SqlException Wrap Handler from Enterprise Library Contrib.  Hopefully it can meet your requirements.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com