使用微软企业库异常处理

using System;
//
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;

/// <summary>
///使用微软企业库-异常处理
/// </summary>
public class EnterpriseException
{
    public void AddDept(string name)
    {
        try
        {
            //
        }
        catch (Exception ex)
        {
            bool reThrow = ExceptionPolicy.HandleException(ex, "Data Access Policy");
            if (reThrow)
            {
                throw;
            }
        }

    }
}

原文地址:https://www.cnblogs.com/sobaby/p/1269759.html