mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +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();
|
units = unit_assignment->Units();
|
||||||
}
|
}
|
||||||
if ( ! units ) return true;
|
if ( ! units ) return true;
|
||||||
|
try {
|
||||||
for ( IfcUtil::IfcAbstractSelect::it it = units->begin(); it != units->end(); ++ it ) {
|
for ( IfcUtil::IfcAbstractSelect::it it = units->begin(); it != units->end(); ++ it ) {
|
||||||
const IfcUtil::IfcAbstractSelect::ptr base = *it;
|
const IfcUtil::IfcAbstractSelect::ptr base = *it;
|
||||||
Ifc2x3::IfcSIUnit::ptr unit = Ifc2x3::IfcSIUnit::ptr();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user