mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Catch errors while looking for IfcUnitAssignments
This commit is contained in:
@@ -616,6 +616,7 @@ bool Ifc::Init(IfcParse::File* f) {
|
||||
units = unit_assignment->Units();
|
||||
}
|
||||
if ( ! units ) return true;
|
||||
try {
|
||||
for ( IfcUtil::IfcAbstractSelect::it it = units->begin(); it != units->end(); ++ it ) {
|
||||
const IfcUtil::IfcAbstractSelect::ptr base = *it;
|
||||
Ifc2x3::IfcSIUnit::ptr unit = Ifc2x3::IfcSIUnit::ptr();
|
||||
@@ -646,6 +647,9 @@ bool Ifc::Init(IfcParse::File* f) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch ( IfcException ex ) {
|
||||
Ifc::LogMessage("Error",ex.what());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user