Commit 1a7b7999 LN

1

1 个父辈 9f35dc4d
......@@ -126,18 +126,21 @@ namespace TSA_V
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
LogUnhandledException(e.ExceptionObject);
LogUnhandledException("CurrentDomain_UnhandledException", e.ToString() + "" + e.ExceptionObject.ToString() + " ");
}
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
LogUnhandledException(e.Exception);
LogUnhandledException("Application_ThreadException", e.ToString() + "" + e.Exception.ToString() + " ");
}
static void LogUnhandledException(object exceptionobj)
static void LogUnhandledException(string type, string exceptionobj)
{
//这里可以进一步地写日志
LogUtil.error(exceptionobj.ToString());
LogUtil.error("【" + type + "】" + exceptionobj);
MessageBox.Show(exceptionobj, type);
LogUtil.error("【" + type + "】" + exceptionobj);
}
}
}
......@@ -222,6 +222,8 @@ namespace TSA_V
}
private void timer_Tick(object sender, EventArgs e)
{
try
{
TimeSpan ss = DateTime.Now - LastTime;
if (ss.TotalSeconds > TSAVBean.AuToModeSeconds)
{
......@@ -251,7 +253,10 @@ namespace TSA_V
ShowAOI();
}
}
}catch (Exception ex)
{
LogUtil.error(Name+ "timer_Tick 出错:" + ex.ToString());
}
}
private DateTime LastTime = DateTime.Now;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!