UOM // Let things in saveData() catchable in all cases.
This commit is contained in:
parent
38535768bc
commit
4b59c5ff5b
|
@ -326,9 +326,8 @@ extension vChewing.LMUserOverride {
|
||||||
public func saveData(toURL fileURL: URL) {
|
public func saveData(toURL fileURL: URL) {
|
||||||
let encoder = JSONEncoder()
|
let encoder = JSONEncoder()
|
||||||
do {
|
do {
|
||||||
if let jsonData = try? encoder.encode(mutLRUMap) {
|
guard let jsonData = try? encoder.encode(mutLRUMap) else { return }
|
||||||
try jsonData.write(to: fileURL, options: .atomic)
|
try jsonData.write(to: fileURL, options: .atomic)
|
||||||
}
|
|
||||||
} catch {
|
} catch {
|
||||||
IME.prtDebugIntel("UOM Error: Unable to save data, abort saving. Details: \(error)")
|
IME.prtDebugIntel("UOM Error: Unable to save data, abort saving. Details: \(error)")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue