mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +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) {
|
ptree& format_entity_instance(IfcUtil::IfcBaseEntity* instance, ptree& child, ptree& tree, bool as_link = false) {
|
||||||
const unsigned n = instance->getArgumentCount();
|
const unsigned n = instance->getArgumentCount();
|
||||||
for (unsigned i = 0; i < n; ++i) {
|
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);
|
const Argument* argument = instance->getArgument(i);
|
||||||
if (argument->isNull()) continue;
|
if (argument->isNull()) continue;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user