/// <summary> /// Method that generates log entries and crashes on Android, which are logged on Fabric.io (using Crashlytics) /// </summary> public void CrashMe() { StackFrame fr = new StackFrame(1, true); StackTrace st = new StackTrace(fr); Crashlytics.ThrowNonFatal(); Crashlytics.RecordCustomException("NotSoGood Exception", "I have no clue what just happened", st); Crashlytics.Log("Non Fatal Just Happened"); }
// Force throw an none fatal exception for crashlytics debugging purposes public static void ForceException() { #if analytics // Only allow this function to be called whilst the app is in debug mode if (ProjectManager.IsDebugModeActive()) { ProjectManager.Log("[Analytics Debug] Forced an exception!"); Crashlytics.ThrowNonFatal(); } #endif }
public static void ThrowNonFatal(string error) { Crashlytics.RecordCustomException("ERROR", error, error); Crashlytics.ThrowNonFatal(); }