mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
change(ios): revert temp dev-changes to display "force error" option
Also adds minor documentation to new SentryManager.swift additions Fixes: KEYMAN-IOS-MJ This error was manually triggered to validate this PR's actual changes, given that the aim is to enhance error logging.
This commit is contained in:
parent
ba2fdfd9d2
commit
5942ce0bf6
2 changed files with 8 additions and 4 deletions
|
|
@ -16,12 +16,17 @@ import os.log
|
|||
*/
|
||||
public class SentryManager {
|
||||
private static var _started: Bool = false
|
||||
|
||||
// Set once Manager.shared is fully initialized and safe to reference.
|
||||
private static var engineHasInitialized: Bool = false
|
||||
|
||||
public static var hasStarted: Bool {
|
||||
return _started
|
||||
}
|
||||
|
||||
/**
|
||||
This method should be called once Manager.shared is fully initialized and safe to reference - a precondition needed to enable engine-state logging, such as current keyboard, etc when errors occur.
|
||||
*/
|
||||
public static func setEngineInitialized() {
|
||||
engineHasInitialized = true
|
||||
}
|
||||
|
|
@ -183,7 +188,6 @@ public class SentryManager {
|
|||
|
||||
public static func forceError() {
|
||||
SentrySDK.addBreadcrumb(Sentry.Breadcrumb(level: .info, category: "Deliberate testing error"))
|
||||
capture("Deliberate testing error", sentryLevel: .error)
|
||||
// SentrySDK.crash()
|
||||
SentrySDK.crash()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,13 +111,13 @@ open class SettingsViewController: UITableViewController {
|
|||
"reuseid" : "installfile"
|
||||
])
|
||||
|
||||
// #if DEBUG && !NO_SENTRY
|
||||
#if DEBUG && !NO_SENTRY
|
||||
itemsArray.append([
|
||||
"title": "Force a crash",
|
||||
"subtitle": "Test Sentry error-reporting integration",
|
||||
"reuseid" : "forcederror"
|
||||
])
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
_ = view
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue