Fix VPSSMgr error messages
Display the actual name of the species rather than the name of the species XML node, which is always just "species". Make method names in error messages match the methods where they are generated.
This commit is contained in:
parent
39b751d655
commit
82dca88af2
2 changed files with 8 additions and 8 deletions
|
|
@ -115,12 +115,12 @@ VPSSMgr_ConstVol::initThermoXML(XML_Node& phaseNode, const std::string& id)
|
|||
const XML_Node* ss = s->findByName("standardState");
|
||||
if (!ss) {
|
||||
throw CanteraError("VPSSMgr_ConstVol::initThermoXML",
|
||||
"no standardState Node for species " + s->name());
|
||||
"no standardState Node for species " + s->attrib("name"));
|
||||
}
|
||||
std::string model = (*ss)["model"];
|
||||
if (model != "constant_incompressible" && model != "constantVolume") {
|
||||
throw CanteraError("VPSSMgr_ConstVol::initThermoXML",
|
||||
"standardState model for species isn't constant_incompressible: " + s->name());
|
||||
"standardState model for species isn't constant_incompressible: " + s->attrib("name"));
|
||||
}
|
||||
m_Vss[k] = ctml::getFloat(*ss, "molarVolume", "toSI");
|
||||
}
|
||||
|
|
@ -132,14 +132,14 @@ VPSSMgr_ConstVol::createInstallPDSS(size_t k, const XML_Node& speciesNode,
|
|||
{
|
||||
const XML_Node* ss = speciesNode.findByName("standardState");
|
||||
if (!ss) {
|
||||
throw CanteraError("VPSSMgr_ConstVol::installSpecies",
|
||||
"no standardState Node for species " + speciesNode.name());
|
||||
throw CanteraError("VPSSMgr_ConstVol::createInstallPDSS",
|
||||
"no standardState Node for species " + speciesNode["name"]);
|
||||
}
|
||||
std::string model = (*ss)["model"];
|
||||
if (model != "constant_incompressible" && model != "constantVolume") {
|
||||
throw CanteraError("VPSSMgr_ConstVol::initThermoXML",
|
||||
throw CanteraError("VPSSMgr_ConstVol::createInstallPDSS",
|
||||
"standardState model for species isn't "
|
||||
"constant_incompressible: " + speciesNode.name());
|
||||
"constant_incompressible: " + speciesNode["name"]);
|
||||
}
|
||||
if (m_Vss.size() < k+1) {
|
||||
m_Vss.resize(k+1, 0.0);
|
||||
|
|
|
|||
|
|
@ -95,9 +95,9 @@ VPSSMgr_IdealGas::createInstallPDSS(size_t k, const XML_Node& speciesNode,
|
|||
if (ss) {
|
||||
std::string model = (*ss)["model"];
|
||||
if (model != "ideal_gas") {
|
||||
throw CanteraError("VPSSMgr_IdealGas::initThermoXML",
|
||||
throw CanteraError("VPSSMgr_IdealGas::createInstallPDSS",
|
||||
"standardState model for species isn't "
|
||||
"ideal_gas: " + speciesNode.name());
|
||||
"ideal_gas: " + speciesNode["name"]);
|
||||
}
|
||||
}
|
||||
if (m_Vss.size() < k+1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue