服务端新增异常捕获保存功能,修改了整个项目版本号升级机制,每次提交均增加版本号。
This commit is contained in:
@@ -55,6 +55,8 @@ namespace 软件系统服务端模版
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
|
||||
//检测日志路径是否存储
|
||||
LogSavePath = Application.StartupPath + @"\Logs";
|
||||
if(!System.IO.Directory.Exists(LogSavePath))
|
||||
@@ -63,6 +65,8 @@ namespace 软件系统服务端模版
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 窗口属性+窗口方法
|
||||
|
||||
/// <summary>
|
||||
@@ -176,6 +180,21 @@ namespace 软件系统服务端模版
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个处理服务器未处理异常的方法,对该方法进行记录,方便以后的分析
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
if(e.ExceptionObject is Exception ex)
|
||||
{
|
||||
RuntimeLogHelper.SaveError("UnhandledException:", ex);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 菜单逻辑块
|
||||
|
||||
Reference in New Issue
Block a user