Skip to content

Commit

Permalink
Skip parsing CKAN files we don’t understand
Browse files Browse the repository at this point in the history
This means less unexplained crashes on startup.

Fixes #23
  • Loading branch information
winsmith committed Mar 17, 2019
1 parent 319d8e0 commit f53a4ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CKANKit/CKANRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f53a4ba

Please sign in to comment.