111,076
社区成员




/// <summary>
/// 构造函数
/// </summary>
public SyncService()
{
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
InitializeComponent();
}
/// <summary>
/// 捕获未处理异常
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Exception ex = (Exception)e.ExceptionObject;
string msg_IsTerminating = e.IsTerminating ? "公共语言运行库即将终止!" : "";
Logger.Singleton.Fatal("捕获到未处理的异常!" + msg_IsTerminating, ex);
}