From d61b277fff4f1724d7f0cea04f486cf22527259a Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 3 Mar 2009 23:51:46 +0000 Subject: [PATCH] Fixed an error in an error statement. --- Cantera/src/thermo/VPSSMgr_Water_ConstVol.cpp | 6 ++++-- Cantera/src/thermo/VPSSMgr_Water_HKFT.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cantera/src/thermo/VPSSMgr_Water_ConstVol.cpp b/Cantera/src/thermo/VPSSMgr_Water_ConstVol.cpp index daeae2de9..b70d18f88 100644 --- a/Cantera/src/thermo/VPSSMgr_Water_ConstVol.cpp +++ b/Cantera/src/thermo/VPSSMgr_Water_ConstVol.cpp @@ -238,14 +238,16 @@ namespace Cantera { } const XML_Node *ss = s->findByName("standardState"); if (!ss) { + std::string sName = s->operator[]("name"); throw CanteraError("VPSSMgr_Water_ConstVol::initThermoXML", - "no standardState Node for species " + s->name()); + "no standardState Node for species " + sName); } std::string model = (*ss)["model"]; if (model != "constant_incompressible") { + std::string sName = s->operator[]("name"); throw CanteraError("VPSSMgr_Water_ConstVol::initThermoXML", "standardState model for species isn't " - "constant_incompressible: " + s->name()); + "constant_incompressible: " + sName); } m_Vss[k] = getFloat(*ss, "molarVolume", "toSI"); } diff --git a/Cantera/src/thermo/VPSSMgr_Water_HKFT.cpp b/Cantera/src/thermo/VPSSMgr_Water_HKFT.cpp index 9de92b01b..87ec184ea 100644 --- a/Cantera/src/thermo/VPSSMgr_Water_HKFT.cpp +++ b/Cantera/src/thermo/VPSSMgr_Water_HKFT.cpp @@ -246,8 +246,9 @@ namespace Cantera { const XML_Node *ss = speciesNode.findByName("standardState"); if (!ss) { + std::string sName = speciesNode["name"]; throw CanteraError("VPSSMgr_Water_HKFT::installSpecies", - "No standardState Node for species " + speciesNode.name()); + "No standardState Node for species " + sName); } // Will have to do something for water // -> make sure it's species 0 @@ -279,9 +280,10 @@ namespace Cantera { } else { std::string model = (*ss)["model"]; if (model != "HKFT") { + std::string sName = speciesNode["name"]; throw CanteraError("VPSSMgr_Water_HKFT::initThermoXML", "standardState model for species isn't " - "HKFT: " + speciesNode.name()); + "HKFT: " + sName); } kPDSS = new PDSS_HKFT(m_vptp_ptr, k, speciesNode, *phaseNode_ptr, true);