commit 150e94958dddd777b05322a30a838ba2df65cb33
parent b903776f449e3cd207011aa5177eb237cc410cb6
Author: Marc Stibane <marc@taler.net>
Date: Wed, 19 Aug 2026 07:31:54 +0200
AI: error handling
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift
@@ -620,15 +620,19 @@ extension WalletCore {
return
} catch DecodingError.dataCorrupted(let context) {
logger.error("\(context.debugDescription)")
+ err = DecodingError.dataCorrupted(context)
} catch DecodingError.keyNotFound(let key, let context) {
logger.error("Key '\(key.stringValue)' not found:\(context.debugDescription)")
logger.error("\(context.codingPath)")
+ err = DecodingError.keyNotFound(key, context)
} catch DecodingError.valueNotFound(let value, let context) {
logger.error("Value '\(value)' not found:\(context.debugDescription)")
logger.error("\(context.codingPath)")
+ err = DecodingError.valueNotFound(value, context)
} catch DecodingError.typeMismatch(let type, let context) {
logger.error("Type '\(type)' mismatch:\(context.debugDescription)")
logger.error("\(context.codingPath)")
+ err = DecodingError.typeMismatch(type, context)
} catch { // rethrows
if let jsonString = String(data: json, encoding: .utf8) {
symLog.log(jsonString) // TODO: .error