From 084151ed4c4ef8e843953c6bee9d7c240203476b Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 3 Oct 2022 14:03:53 +0200 Subject: [PATCH] Augment invalid entity message with offset in file --- src/ifcparse/IfcParse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 69b426e0a6..0f60c9d3f2 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -1538,7 +1538,7 @@ void IfcFile::initialize_(IfcParse::IfcSpfStream* s) { try { entity_type = schema_->declaration_by_name(TokenFunc::asStringRef(token_stream[2])); } catch (const IfcException& ex) { - Logger::Message(Logger::LOG_ERROR, ex.what()); + Logger::Message(Logger::LOG_ERROR, std::string(ex.what()) + " at offset " + std::to_string(token_stream[2].startPos)); goto advance; }