From 97baf74684f72c3f513592816deb622d9e1fd40b Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 30 八月 2018 17:02:01 +0800
Subject: [PATCH] 2199 加载地图过程中可能出现错误的记录
---
Utility/ExceptionCatcher.cs | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/Utility/ExceptionCatcher.cs b/Utility/ExceptionCatcher.cs
index 48772f9..8ee8a49 100644
--- a/Utility/ExceptionCatcher.cs
+++ b/Utility/ExceptionCatcher.cs
@@ -7,30 +7,25 @@
{
public static void Init()
{
- if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
- {
#if !UNITY_EDITOR
BuglyAgent.ConfigDebugMode(false);
- BuglyAgent.ConfigAutoReportLogLevel(VersionConfig.Get().versionAuthority == VersionAuthority.Release ? LogSeverity.LogException : LogSeverity.LogError);
+ BuglyAgent.ConfigAutoReportLogLevel(LogSeverity.LogException);
BuglyAgent.ConfigDefault(VersionConfig.Get().appId, VersionConfig.Get().version, SystemInfo.deviceName, 0);
+
#if UNITY_ANDROID
BuglyAgent.InitWithAppId("bff7374864");
#elif UNITY_IPHONE || UNITY_IOS
BuglyAgent.InitWithAppId("553c67c376");
#endif
-#endif
- }
+#endif
}
public static void Catch()
{
- if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
- {
#if !UNITY_EDITOR
- BuglyAgent.EnableExceptionHandler();
+ BuglyAgent.EnableExceptionHandler();
#endif
- }
}
public static void Abort()
@@ -38,4 +33,19 @@
}
+ public static void ReportException(string name, System.Exception ex)
+ {
+#if !UNITY_EDITOR
+ BuglyAgent.ReportException(name, ex.Message, ex.StackTrace);
+#endif
+ }
+
+ public static void ReportException(string name, string message)
+ {
+#if !UNITY_EDITOR
+ BuglyAgent.ReportException(name, message, "");
+#endif
+ }
+
+
}
--
Gitblit v1.8.0