Module:CountryData: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 611: | Line 611: | ||
-- Returns a table of properties that can be integrated with the batch processing system | -- Returns a table of properties that can be integrated with the batch processing system | ||
function CountryData.getSemanticCountryRegionProperties(countryValue, errorContext) | function CountryData.getSemanticCountryRegionProperties(countryValue, errorContext) | ||
-- Debug: Function entry | |||
local ErrorHandling = require('Module:ErrorHandling') | |||
local debugContext = ErrorHandling.createContext("CountryData") | |||
ErrorHandling.addError(debugContext, "FunctionEntryDebug", | |||
string.format("getSemanticCountryRegionProperties called with: '%s'", countryValue or "nil"), | |||
"", false) | |||
-- Initialize return table | -- Initialize return table | ||
local properties = {} | local properties = {} | ||
if not countryValue or countryValue == "" then | if not countryValue or countryValue == "" then | ||
ErrorHandling.addError(debugContext, "EarlyReturnDebug", | |||
"Returning early: countryValue is nil or empty", | |||
"", false) | |||
return properties | return properties | ||
end | end | ||