try to migrate AMF

pull/2966/head
Kim Kulling 2020-01-23 21:25:25 +01:00
parent a905303764
commit 11f49f85c4
2 changed files with 8 additions and 9 deletions

View File

@ -156,12 +156,11 @@ void AMFImporter::Throw_CloseNotFound(const std::string& pNode) {
throw DeadlyImportError("Close tag for node <" + pNode + "> not found. Seems file is corrupt."); throw DeadlyImportError("Close tag for node <" + pNode + "> not found. Seems file is corrupt.");
} }
void AMFImporter::Throw_IncorrectAttr(const std::string& pAttrName) { void AMFImporter::Throw_IncorrectAttr(const std::string &nodeName, const std::string &pAttrName) {
throw DeadlyImportError("Node <" + std::string(mReader->getNodeName()) + "> has incorrect attribute \"" + pAttrName + "\"."); throw DeadlyImportError("Node <" + nodeName + "> has incorrect attribute \"" + pAttrName + "\".");
} }
void AMFImporter::Throw_IncorrectAttrValue(const std::string& pAttrName) void AMFImporter::Throw_IncorrectAttrValue(const std::string &nodeName, const std::string &pAttrName) {
{
throw DeadlyImportError("Attribute \"" + pAttrName + "\" in node <" + std::string(mReader->getNodeName()) + "> has incorrect value."); throw DeadlyImportError("Attribute \"" + pAttrName + "\" in node <" + std::string(mReader->getNodeName()) + "> has incorrect value.");
} }

View File

@ -256,12 +256,12 @@ private:
/// Call that function when attribute name is incorrect and exception must be raised. /// Call that function when attribute name is incorrect and exception must be raised.
/// \param [in] pAttrName - attribute name. /// \param [in] pAttrName - attribute name.
/// \throw DeadlyImportError. /// \throw DeadlyImportError.
void Throw_IncorrectAttr(const std::string& pAttrName); void Throw_IncorrectAttr(const std::string &nodeName, const std::string& pAttrName);
/// Call that function when attribute value is incorrect and exception must be raised. /// Call that function when attribute value is incorrect and exception must be raised.
/// \param [in] pAttrName - attribute name. /// \param [in] pAttrName - attribute name.
/// \throw DeadlyImportError. /// \throw DeadlyImportError.
void Throw_IncorrectAttrValue(const std::string& pAttrName); void Throw_IncorrectAttrValue(const std::string &nodeName, const std::string &pAttrName);
/// Call that function when some type of nodes are defined twice or more when must be used only once and exception must be raised. /// Call that function when some type of nodes are defined twice or more when must be used only once and exception must be raised.
/// E.g.: /// E.g.:
@ -285,10 +285,10 @@ private:
/// Check if current node name is equal to pNodeName. /// Check if current node name is equal to pNodeName.
/// \param [in] pNodeName - name for checking. /// \param [in] pNodeName - name for checking.
/// return true if current node name is equal to pNodeName, else - false. /// return true if current node name is equal to pNodeName, else - false.
bool XML_CheckNode_NameEqual(const std::string& pNodeName){ //bool XML_CheckNode_NameEqual(const std::string& pNodeName){
// return mReader->getNodeName() == pNodeName; // return mReader->getNodeName() == pNodeName;
mReader->mDoc. //mReader->mDoc.
} //}
/// Skip unsupported node and report about that. Depend on node name can be skipped begin tag of node all whole node. /// Skip unsupported node and report about that. Depend on node name can be skipped begin tag of node all whole node.
/// \param [in] pParentNodeName - parent node name. Used for reporting. /// \param [in] pParentNodeName - parent node name. Used for reporting.