diff --git a/docs/en/Country_Code.md b/docs/en/Country_Code.md new file mode 100644 index 0000000..4e81776 --- /dev/null +++ b/docs/en/Country_Code.md @@ -0,0 +1,5 @@ +##Country Code + +| Country Code | Country Name | +| ------------- | ------------- | +| ZZ | [Unknown Country](https://stackoverflow.com/questions/20973960/i-am-getting-zz-as-country-code-when-using-pytz) | diff --git a/src/dataPreprocessors/GeometryDataProcessor.js b/src/dataPreprocessors/GeometryDataProcessor.js index 1e3e25c..0916b81 100644 --- a/src/dataPreprocessors/GeometryDataProcessor.js +++ b/src/dataPreprocessors/GeometryDataProcessor.js @@ -34,10 +34,21 @@ GeometryDataProcessor.prototype.processDetail = function ( controller ) { var exporterName = set.e.toUpperCase(); var importerName = set.i.toUpperCase(); + + if (exporterName == "ZZ" || importerName == "ZZ") { + console.group("ZZ unknown country") + console.log("ZZ country code detected for current countries this will not be print on the globe"); + console.log({exporterName,importerName}) + console.groupEnd(); + + delete controller.inputData[s]; + + continue; + } var exporter = CountryData[ exporterName ]; var importer = CountryData[ importerName ]; - + if (exporter==null) throw exporterName+" is not referenced as a country code! See the full list there : https://github.com/syt123450/giojs/blob/master/src/countryInfo/CountryData.js"; if (importer==null) throw importerName+" is not referenced as a country code! See the full list there : https://github.com/syt123450/giojs/blob/master/src/countryInfo/CountryData.js";