Version property for tehcnology tag is not mandatory.
This commit is contained in:
parent
7d49e75797
commit
3c2062bdd0
|
@ -92,13 +92,15 @@ Techno* Techno::readFromFile(const string filePath) {
|
|||
xmlChar* technoUnitC = xmlGetProp(rootElement, (xmlChar*)"unit");
|
||||
xmlChar* technoVersC = xmlGetProp(rootElement, (xmlChar*)"version");
|
||||
|
||||
if (technoNameC && technoUnitC && technoVersC) {
|
||||
if (technoNameC && technoUnitC) {
|
||||
Name name ((const char*)technoNameC);
|
||||
Name unit ((const char*)technoUnitC);
|
||||
Name vers ((const char*)technoVersC);
|
||||
Name vers = Name("");
|
||||
if (technoVersC)
|
||||
vers = Name((const char*)technoVersC);
|
||||
techno = new Techno(name, unit, vers);
|
||||
} else {
|
||||
throw DTRException("[ERROR] 'technology' node must have 'name', 'unit' and 'version' properties.");
|
||||
throw DTRException("[ERROR] 'technology' node must have 'name' and 'unit' properties.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue