Skip to content

Commit 39dafce

Browse files
committed
Catch errors while looking for IfcUnitAssignments
1 parent 61c07db commit 39dafce

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/ifcparse/IfcParse.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ bool Ifc::Init(IfcParse::File* f) {
616616
units = unit_assignment->Units();
617617
}
618618
if ( ! units ) return true;
619+
try {
619620
for ( IfcUtil::IfcAbstractSelect::it it = units->begin(); it != units->end(); ++ it ) {
620621
const IfcUtil::IfcAbstractSelect::ptr base = *it;
621622
Ifc2x3::IfcSIUnit::ptr unit = Ifc2x3::IfcSIUnit::ptr();
@@ -646,6 +647,9 @@ bool Ifc::Init(IfcParse::File* f) {
646647
}
647648
}
648649
}
650+
} catch ( IfcException ex ) {
651+
Ifc::LogMessage("Error",ex.what());
652+
}
649653
return true;
650654
}
651655

0 commit comments

Comments
 (0)