From e2fd4eb8fcbe44d4fb5fcc9f3c404bcbe7ce769f Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Thu, 3 Aug 2017 21:48:00 +0200 Subject: [PATCH] more informative decoding errors --- Sources/XcodeGen/main.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/XcodeGen/main.swift b/Sources/XcodeGen/main.swift index 306aa212..c43715c7 100644 --- a/Sources/XcodeGen/main.swift +++ b/Sources/XcodeGen/main.swift @@ -12,6 +12,7 @@ import Commander import XcodeGenKit import xcodeproj import ProjectSpec +import JSONUtilities func generate(spec: String, project: String?) { @@ -31,6 +32,9 @@ func generate(spec: String, project: String?) { do { spec = try ProjectSpec(path: specPath) print("Loaded spec: \(spec.targets.count) targets, \(spec.schemes.count) schemes, \(spec.configs.count) configs") + } catch let error as DecodingError { + print("Parsing spec failed: \(error.description)") + return } catch { print("Parsing spec failed: \(error.localizedDescription)") return