增加日志写入

This commit is contained in:
liufei
2021-12-22 13:14:54 +08:00
parent 8d4201f5ba
commit 353acec75e
22 changed files with 160 additions and 151 deletions

View File

@@ -53,9 +53,10 @@ namespace GeekDesk.Control.UserControls.Config
appConfig.BacImgName = ofd.FileName;
}
}
catch (Exception)
catch (Exception e1)
{
HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
LogUtil.WriteErrorLog(e1, "修改背景失败!");
}
}
@@ -69,9 +70,10 @@ namespace GeekDesk.Control.UserControls.Config
appConfig.BitmapImage = ImageUtil.Base64ToBitmapImage(Constants.DEFAULT_BAC_IMAGE_BASE64);
appConfig.BacImgName = "系统默认";
}
catch (Exception)
catch (Exception e1)
{
HandyControl.Controls.Growl.WarningGlobal("修改背景失败,已重置为默认背景!");
LogUtil.WriteErrorLog(e1, "修改默认背景失败!");
}
}

View File

@@ -195,9 +195,10 @@ namespace GeekDesk.Control.UserControls.PannelCard
p.Start();
icon.Count++;
}
catch (Exception)
catch (Exception e)
{
HandyControl.Controls.Growl.WarningGlobal("程序启动失败(不支持的启动方式)!");
LogUtil.WriteErrorLog(e, "程序启动失败:path=" + icon.Path + ",type=" + type);
}
}