Example #1
0
 public static void LogException(Exception e)
 {
     Debug.LogException(e);
     #if STENCIL_FIREBASE
     Crashlytics.LogException(e);
     #endif
 }
Example #2
0
 public static void LogException(System.Exception e)
 {
     if (!setupReady)
     {
         return;
     }
     Crashlytics.LogException(e);
 }
Example #3
0
 private static void ThrowIntentionallyObscureException()
 {
     try {
         throw new IntentionallyObscureException("An error occurred.");
     }
     catch (CrashlyticsCaughtException e) {
         Crashlytics.LogException(e);
     }
 }
Example #4
0
 private static void ThrowAnotherForcedException(String message)
 {
     try {
         throw new AnotherForcedException(message);
     }
     catch (CrashlyticsCaughtException e) {
         Crashlytics.LogException(e);
     }
 }
Example #5
0
 private static void ThrowMenuMeltdown(String message)
 {
     try {
         throw new MenuMeltdownException(message);
     }
     catch (CrashlyticsCaughtException e) {
         Crashlytics.LogException(e);
     }
 }
Example #6
0
 private static void ThrowStatisticallyAsLikelyException(String message)
 {
     try {
         throw new StatisticallyAsLikelyException(message);
     }
     catch (CrashlyticsCaughtException e) {
         Crashlytics.LogException(e);
     }
 }
Example #7
0
 // 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);
     }
 }
Example #8
0
 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;
                    }
                };
            }
        }