少年修仙传客户端代码仓库
client_Zxw
2018-08-30 861522f900702bf928f4ee4857bfef90e1939711
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
    }
}