public static void LogException(Exception e) { Debug.LogException(e); #if STENCIL_FIREBASE Crashlytics.LogException(e); #endif }
public static void LogException(System.Exception e) { if (!setupReady) { return; } Crashlytics.LogException(e); }
private static void ThrowIntentionallyObscureException() { try { throw new IntentionallyObscureException("An error occurred."); } catch (CrashlyticsCaughtException e) { Crashlytics.LogException(e); } }
private static void ThrowAnotherForcedException(String message) { try { throw new AnotherForcedException(message); } catch (CrashlyticsCaughtException e) { Crashlytics.LogException(e); } }
private static void ThrowMenuMeltdown(String message) { try { throw new MenuMeltdownException(message); } catch (CrashlyticsCaughtException e) { Crashlytics.LogException(e); } }
private static void ThrowStatisticallyAsLikelyException(String message) { try { throw new StatisticallyAsLikelyException(message); } catch (CrashlyticsCaughtException e) { Crashlytics.LogException(e); } }
// Log a caught exception. public void LogCaughtException() { DebugLog("Catching an logging an exception."); try { throw new InvalidOperationException("This exception should be caught"); } catch (Exception ex) { Crashlytics.LogException(ex); } }
private static void ThrowRandomTextException(String message) { Crashlytics.SetCustomKey("guid", Guid.NewGuid().ToString()); try { throw new RandomTextException(message); } catch (CrashlyticsCaughtException e) { Crashlytics.LogException(e); } }
public FirebaseTracking() { if (!Application.isEditor) { Application.logMessageReceivedThreaded += (message, trace, type) => { switch (type) { case LogType.Error: case LogType.Assert: case LogType.Exception: Crashlytics.LogException(new ExceptionForCrashlytics(message, trace)); break; default: Crashlytics.Log($"{type}: {message}"); break; } }; } }