From d005524c4c16b1f320defd3792c4e9928345d25c Mon Sep 17 00:00:00 2001 From: Otso Alho Date: Tue, 7 Jun 2022 14:37:12 +0300 Subject: [PATCH] catch missing instances one by one. do not throw away whole relation. --- src/ifcparse/IfcParse.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index b2658e23e6..44d5ef2b9a 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -827,8 +827,12 @@ ArgumentList::operator aggregate_of_instance::ptr() const { aggregate_of_instance::ptr l ( new aggregate_of_instance() ); for (size_t i = 0; i < size_; ++i) { // FIXME: account for $ - IfcUtil::IfcBaseClass* entity = *list_[i]; - l->push(entity); + try { + IfcUtil::IfcBaseClass *entity = *list_[i]; + l->push(entity); + } catch (IfcException e) { + Logger::Error(e); + } } return l; }