DEVTOOLS-181 Gérer le tag noTranslation pour les xcstrings

This commit is contained in:
2024-04-17 09:44:09 +02:00
parent 27f86f5c4d
commit fb2ddb2227
6 changed files with 59 additions and 115 deletions

View File

@ -16,12 +16,15 @@ class ConfigurationFileParser {
Generate.exit(withError: error)
}
guard let configuration = try? YAMLDecoder().decode(ConfigurationFile.self, from: data) else {
let error = GenerateError.invalidConfigurationFile(configurationFile)
do {
return try YAMLDecoder().decode(ConfigurationFile.self, from: data)
} catch {
let error = GenerateError.invalidConfigurationFile(
configurationFile,
error.localizedDescription.description
)
print(error.description)
Generate.exit(withError: error)
}
return configuration
}
}