增加错误日志
This commit is contained in:
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Security.Policy;
|
using System.Security.Policy;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using NLog;
|
||||||
|
|
||||||
namespace SpineViewer.Controls
|
namespace SpineViewer.Controls
|
||||||
{
|
{
|
||||||
@@ -252,6 +253,11 @@ namespace SpineViewer.Controls
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 日志器
|
||||||
|
/// </summary>
|
||||||
|
private Logger logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
public SpinePreviewer()
|
public SpinePreviewer()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -422,9 +428,11 @@ namespace SpineViewer.Controls
|
|||||||
RenderWindow.Display();
|
RenderWindow.Display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw;
|
logger.Fatal(ex);
|
||||||
|
logger.Fatal("Render task stopped");
|
||||||
|
MessageBox.Error(ex.ToString(), "预览画面已停止渲染");
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user