From 7b60238359b94125d591678eff105ae2bf47843f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 15 十一月 2019 13:16:21 +0800
Subject: [PATCH] 2019.11.15
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
index b7e2b4e..267595d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlThreadLogic.cs
@@ -56,10 +56,9 @@
alert.Show();
});
//Log鍑哄姏
- string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]\r\n";
- msg += ex.Message + "\r\n";
- msg += ex.TargetSite.ToString();
+ string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]";
HdlLogLogic.Current.WriteLog(-1, msg);
+ HdlLogLogic.Current.WriteLog(ex);
}
})
{ IsBackground = true }.Start();
@@ -87,10 +86,9 @@
var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
alert.Show();
//Log鍑哄姏
- string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]\r\n";
- msg += ex.Message + "\r\n";
- msg += ex.TargetSite.ToString();
+ string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]";
HdlLogLogic.Current.WriteLog(-1, msg);
+ HdlLogLogic.Current.WriteLog(ex);
}
});
@@ -98,6 +96,34 @@
{ IsBackground = true }.Start();
}
+ /// <summary>
+ /// 鎵ц杩愯浜庝富绾跨▼(鍒涘缓杩欎釜涓滆タ,鏄负浜哃og鍑哄姏)
+ /// </summary>
+ public void RunMain(Action action)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ //璁板綍璧峰綋鍓嶇晫闈紝铏界劧浼间箮娌″暐鐢�
+ string nowFormId = UserCenterResourse.NowActionFormID;
+ try
+ {
+ action.Invoke();
+ action = null;
+ }
+ catch (Exception ex)
+ {
+ //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
+ var alert = new ShowMsgControl(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uUnknownErrorAndDataLost));
+ alert.Show();
+
+ //Log鍑哄姏
+ string msg = "褰撳墠婵�娲荤殑鐣岄潰[" + nowFormId + "]";
+ HdlLogLogic.Current.WriteLog(-1, msg);
+ HdlLogLogic.Current.WriteLog(ex);
+ }
+ });
+ }
+
#endregion
}
}
--
Gitblit v1.8.0