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