mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-18 22:49:10 +00:00
Log cached infra JSON when unable to parse
This commit is contained in:
parent
125c6a7d67
commit
b714f8acd9
@ -106,7 +106,12 @@ public class InfrastructureFactory {
|
||||
guard let data = try? Data(contentsOf: entry) else {
|
||||
continue
|
||||
}
|
||||
guard let infra = try? decoder.decode(Infrastructure.self, from: data) else {
|
||||
let infra: Infrastructure
|
||||
do {
|
||||
infra = try decoder.decode(Infrastructure.self, from: data)
|
||||
} catch let e {
|
||||
log.warning("Unable to load infrastructure \(entry.lastPathComponent): \(e)")
|
||||
log.warning("\(String(data: data, encoding: .utf8)!)")
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user