/*-------------------------------------------------------------------------
 * 功能描述：TryCatchWrapper
 * 作者：xulisong
 * 创建时间： 2018/12/20 11:35:30
 * 版本号：v1.0
 *  -------------------------------------------------------------------------*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Com.FirmLib.UI
{
    /// <summary>
    /// 异常处理包装器
    /// </summary>
    public class TryCatchWrapper
    {
        public static void Handled(Action action)
        {
            try
            {
                action?.Invoke();
            }
            catch (Exception e)
            {
                MessageTipEx.Show(e);
            }
        }
    }
}
