mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-05 11:48:10 +00:00
Use the new swiftString method to get UTF-8 String instead of UTF-16 String.
This commit is contained in:
1 parent
8a86696b60
commit
bca1449a22
11 files changed
+58
-57
No files matched your search
@@ -44,17 +44,17 @@ struct ErrorLogTable {
|
||||
private extension ErrorLogTable {
|
||||
|
||||
static func entryWithRow(_ row: FMResultSet) -> ErrorLogEntry? {
|
||||
guard let sourceName = row.string(forColumn: ErrorLogEntry.DatabaseKey.sourceName),
|
||||
let errorMessage = row.string(forColumn: ErrorLogEntry.DatabaseKey.errorMessage) else {
|
||||
guard let sourceName = row.swiftString(forColumn: ErrorLogEntry.DatabaseKey.sourceName),
|
||||
let errorMessage = row.swiftString(forColumn: ErrorLogEntry.DatabaseKey.errorMessage) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let id = Int(row.longLongInt(forColumn: ErrorLogEntry.DatabaseKey.id))
|
||||
let date = Date(timeIntervalSince1970: row.double(forColumn: ErrorLogEntry.DatabaseKey.date))
|
||||
let sourceID = Int(row.int(forColumn: ErrorLogEntry.DatabaseKey.sourceID))
|
||||
let operation = row.string(forColumn: ErrorLogEntry.DatabaseKey.operation) ?? ""
|
||||
let fileName = row.string(forColumn: ErrorLogEntry.DatabaseKey.fileName) ?? ""
|
||||
let functionName = row.string(forColumn: ErrorLogEntry.DatabaseKey.functionName) ?? ""
|
||||
let operation = row.swiftString(forColumn: ErrorLogEntry.DatabaseKey.operation) ?? ""
|
||||
let fileName = row.swiftString(forColumn: ErrorLogEntry.DatabaseKey.fileName) ?? ""
|
||||
let functionName = row.swiftString(forColumn: ErrorLogEntry.DatabaseKey.functionName) ?? ""
|
||||
let lineNumber = Int(row.int(forColumn: ErrorLogEntry.DatabaseKey.lineNumber))
|
||||
|
||||
return ErrorLogEntry(id: id, date: date, sourceName: sourceName, sourceID: sourceID, operation: operation, fileName: fileName, functionName: functionName, lineNumber: lineNumber, errorMessage: errorMessage)
|
||||
|
||||
Reference in new issue
Block a user