Ticket #1374: errorReport.patch
File errorReport.patch, 2.3 KB (added by , 10 years ago) |
---|
-
gui/common/functions_civinfo.js
14 14 for each (var filename in civFiles) 15 15 { // Parse data if valid file 16 16 var data = parseJSONData(filename); 17 if (Object.keys(data).length == 0) 18 continue; 17 19 translateObjectKeys(data, ["Name", "Description", "History", "Special"]); 18 20 civData[data.Code] = data; 19 21 } -
simulation/components/TechnologyTemplateManager.js
19 19 { 20 20 if (!this.allTechs[template]) 21 21 { 22 this.allTechs[template] = Engine.ReadJSONFile("technologies/" + template + ".json"); 23 if (!this.allTechs[template]) 24 error("Failed to load technology \"" + template + "\""); 22 try 23 { 24 this.allTechs[template] = Engine.ReadJSONFile("technologies/" + template + ".json"); 25 } 26 catch (err) 27 { 28 error(sprintf("%(error)s: parsing JSON data in %(path)s", { error: err.toString(), path: pathname })); 29 this.allTechs[template] = false; 30 } 25 31 } 26 32 27 33 return this.allTechs[template]; -
simulation/components/TechnologyManager.js
283 283 284 284 if (!template) 285 285 { 286 error("Tried to research invalid tech onology: " + uneval(tech));286 error("Tried to research invalid technology: " + uneval(tech)); 287 287 return; 288 288 } 289 289 -
simulation/components/ProductionQueue.js
241 241 // Find the template data so we can determine the build costs 242 242 var cmpTempMan = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager); 243 243 var template = cmpTempMan.GetTemplate(templateName); 244 if (!template )244 if (!template || Object.keys(template) == 0) 245 245 return; 246 246 if (template.Promotion) 247 247 {