服务端新增异常捕获保存功能,修改了整个项目版本号升级机制,每次提交均增加版本号。

This commit is contained in:
dathlin
2017-06-29 08:10:53 +08:00
parent 61aba8d399
commit 392f79c052
2 changed files with 30 additions and 1 deletions

View File

@@ -10,9 +10,19 @@ namespace CommonLibrary
{ {
static CommonLibrary() static CommonLibrary()
{ {
/**************************************************************************
*
* 时间2017年6月29日 07:58:02
* 说明:更改版本机制,每次提交新增修订版的版本号
* 发行:发行版将采用主版本加次版本来发行
*
**************************************************************************/
//初始化模版的版本号 //初始化模版的版本号
//预计第一个正式发行的版本为1.1.0 日期为2017-08-10 //预计第一个正式发行的版本为1.1.0 日期为2017-08-10
SoftBasic.FrameworkVersion = new SystemVersion("1.0.6"); SoftBasic.FrameworkVersion = new SystemVersion("1.0.7");
} }

View File

@@ -55,6 +55,8 @@ namespace 软件系统服务端模版
{ {
InitializeComponent(); InitializeComponent();
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
//检测日志路径是否存储 //检测日志路径是否存储
LogSavePath = Application.StartupPath + @"\Logs"; LogSavePath = Application.StartupPath + @"\Logs";
if(!System.IO.Directory.Exists(LogSavePath)) if(!System.IO.Directory.Exists(LogSavePath))
@@ -63,6 +65,8 @@ namespace 软件系统服务端模版
} }
} }
#region + #region +
/// <summary> /// <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 #endregion
#region #region