From 1dca439ee314dc1463605373dcd37465232a16d3 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 14 Jan 2025 12:07:21 +0100 Subject: [PATCH] Don't throw exception but set to $ when encountering invalid instance name #5680 --- src/ifcparse/IfcParse.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index eb883a067e..7e7405278b 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -502,7 +502,9 @@ Token IfcParse::GeneralTokenPtr(IfcSpfLexer* lexer, unsigned start, unsigned end if (first == '#') { token.type = Token_IDENTIFIER; if (!ParseInt(tokenStr.c_str() + 1, token.value_int)) { - throw IfcException("Identifier token as not integer"); + Logger::Message(Logger::LOG_ERROR, "Token '" + tokenStr + "' at offset " + std::to_string(token.startPos) + " is not valid"); + token.type = Token_OPERATOR; + token.value_char = '$'; } } else if (first == '\'') { token.type = Token_STRING;