diff --git a/Tusker/CoreData/MastodonCachePersistentStore.swift b/Tusker/CoreData/MastodonCachePersistentStore.swift index b54281c5cc..346f0e3672 100644 --- a/Tusker/CoreData/MastodonCachePersistentStore.swift +++ b/Tusker/CoreData/MastodonCachePersistentStore.swift @@ -11,6 +11,7 @@ import CoreData import Pachyderm import Combine import OSLog +import Sentry fileprivate let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "PersistentStore") @@ -73,6 +74,9 @@ class MastodonCachePersistentStore: NSPersistentContainer { try context.save() } catch { logger.error("Unable to save managed object context: \(String(describing: error), privacy: .public)") + let crumb = Breadcrumb(level: .fatal, category: "PersistentStore") + crumb.message = String(describing: error) + SentrySDK.addBreadcrumb(crumb: crumb) fatalError("Unable to save managed object context") } }