使用微软企业库-异常处理

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;
            }
        }

    }
}

posted @ 2008-08-17 14:37  sobaby  阅读(500)  评论(0编辑  收藏  举报