mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 19:36:21 +00:00
Don't fail on invalid enumeration literal
This commit is contained in:
@@ -53,7 +53,11 @@ namespace {
|
|||||||
fn(IfcParse::TokenFunc::asBool(t));
|
fn(IfcParse::TokenFunc::asBool(t));
|
||||||
} else if (t.type == IfcParse::Token_ENUMERATION) {
|
} else if (t.type == IfcParse::Token_ENUMERATION) {
|
||||||
if (decl->as_enumeration_type()) {
|
if (decl->as_enumeration_type()) {
|
||||||
fn(EnumerationReference(decl->as_enumeration_type(), decl->as_enumeration_type()->lookup_enum_offset(IfcParse::TokenFunc::asStringRef(t))));
|
try {
|
||||||
|
fn(EnumerationReference(decl->as_enumeration_type(), decl->as_enumeration_type()->lookup_enum_offset(IfcParse::TokenFunc::asStringRef(t))));
|
||||||
|
} catch (IfcParse::IfcException& e) {
|
||||||
|
Logger::Error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (t.type == IfcParse::Token_FLOAT) {
|
} else if (t.type == IfcParse::Token_FLOAT) {
|
||||||
fn(IfcParse::TokenFunc::asFloat(t));
|
fn(IfcParse::TokenFunc::asFloat(t));
|
||||||
|
|||||||
Reference in New Issue
Block a user