mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Workaround wrong argument count. Fix #419
This commit is contained in:
committed by
Thomas Krijnen
parent
58d70f5a8e
commit
8a2c341027
@@ -135,6 +135,12 @@ boost::optional<std::string> format_attribute(const Argument* argument, IfcUtil:
|
||||
ptree& format_entity_instance(IfcUtil::IfcBaseEntity* instance, ptree& child, ptree& tree, bool as_link = false) {
|
||||
const unsigned n = instance->getArgumentCount();
|
||||
for (unsigned i = 0; i < n; ++i) {
|
||||
try {
|
||||
instance->getArgument(i);
|
||||
} catch (const std::exception& e) {
|
||||
Logger::Error("Expected " + boost::lexical_cast<std::string>(n) + " attributes for:", instance->entity);
|
||||
continue;
|
||||
}
|
||||
const Argument* argument = instance->getArgument(i);
|
||||
if (argument->isNull()) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user