Merge branch 'bugfix/CoreGraphics' of git/LCEssentials into main

This commit is contained in:
Loverde Co - Git
2025-04-09 21:20:16 -03:00
committed by Gogs

View File

@@ -58,7 +58,8 @@ extension JSONDecoder {
let msg = "Type mismatch for type '\(type)' \(T.self) Object: \(context.debugDescription)"
error = NSError.createErrorWith(code: 0, description: msg, reasonForError: msg)
} catch let DecodingError.valueNotFound(value, context) {
let msg = "Missing value '\(value)' in \(T.self) Object in JSON: \(context.debugDescription)"
let key = context.codingPath.last?.stringValue ?? "unknown_key"
let msg = "Missing value '\(value)' for key '\(key)' in \(T.self) Object in JSON: \(context.debugDescription)"
error = NSError.createErrorWith(code: 0, description: msg, reasonForError: msg)
} catch {
throw error