From f53a4ba81f1386b0043385f9be06b0de392ad62b Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Sun, 17 Mar 2019 16:18:27 +0100 Subject: [PATCH] =?UTF-8?q?Skip=20parsing=20CKAN=20files=20we=20don?= =?UTF-8?q?=E2=80=99t=20understand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This means less unexplained crashes on startup. Fixes #23 --- CKANKit/CKANRepository.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CKANKit/CKANRepository.swift b/CKANKit/CKANRepository.swift index e1b3b73..a117235 100644 --- a/CKANKit/CKANRepository.swift +++ b/CKANKit/CKANRepository.swift @@ -160,7 +160,11 @@ extension CKANRepository { newModulesDict[release.identifier] = module } } catch let error { - fatalError(error.localizedDescription) + if error is DecodingError { + print("Cannot Decode \(fileURL), skipping...") + } else { + fatalError(error.localizedDescription) + } } } progress?.completedUnitCount += 1