private static void RegisterExceptionHandlers() { if (CrashlyticsInit.IsSDKInitialized()) { Utils.Log(CrashlyticsInit.kitName, "Registering exception handlers"); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CrashlyticsInit.HandleException); // ISSUE: method pointer Application.add_logMessageReceived(new Application.LogCallback((object)null, __methodptr(HandleLog))); } else { Utils.Log(CrashlyticsInit.kitName, "Did not register exception handlers: Crashlytics SDK was not initialized"); } }
private static void RegisterExceptionHandlers() { if (CrashlyticsInit.IsSDKInitialized()) { Utils.Log(CrashlyticsInit.kitName, "Registering exception handlers"); AppDomain currentDomain = AppDomain.CurrentDomain; if (CrashlyticsInit.__f__mg_cache0 == null) { CrashlyticsInit.__f__mg_cache0 = new UnhandledExceptionEventHandler(CrashlyticsInit.HandleException); } currentDomain.UnhandledException += CrashlyticsInit.__f__mg_cache0; if (CrashlyticsInit.__f__mg_cache1 == null) { CrashlyticsInit.__f__mg_cache1 = new Application.LogCallback(CrashlyticsInit.HandleLog); } Application.logMessageReceived += CrashlyticsInit.__f__mg_cache1; } else { Utils.Log(CrashlyticsInit.kitName, "Did not register exception handlers: Crashlytics SDK was not initialized"); } }