diff --git a/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift b/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift index b6b7ccc163..1f16ebbe2d 100644 --- a/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift +++ b/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift @@ -320,7 +320,9 @@ extension TSAttachmentMigration { do { return try TSAttachmentMigration.OWSImageSource(fileUrl: unencryptedFileUrl) } catch { - throw OWSAssertionError("Failed to open file handle image source") + var errorString = "\(error)" + errorString = errorString.replacingOccurrences(of: unencryptedFileUrl.lastPathComponent, with: "xxxx") + throw OWSAssertionError("Failed to open file handle image source \(errorString)") } }()