some additions to pR 1794:

add a special XMLAttributeError class to indicate an error when accessing a missing attribute
in PropertyContainer::Restore make error handling more flexible
This commit is contained in:
wmayer
2018-11-19 19:07:56 +01:00
parent 7216dba2f3
commit ddb20468ad
7 changed files with 71 additions and 19 deletions

View File

@@ -175,8 +175,8 @@ const char* Base::XMLReader::getAttribute (const char* AttrName) const
else {
// wrong name, use hasAttribute if not sure!
std::ostringstream msg;
msg << "Attribute: \"" << AttrName << "\" not found";
THROWM(Base::AttributeError, msg.str());
msg << "XML Attribute: \"" << AttrName << "\" not found";
throw Base::XMLAttributeError(msg.str());
}
}