From c56c7288e33092e1e60826633a1968c48a5a6810 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 3 Oct 2022 14:03:04 +0200 Subject: [PATCH] Clarify wrong attribute count message --- src/ifcparse/IfcParse.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index a15e8b630f..69b426e0a6 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -1110,9 +1110,14 @@ void IfcEntityInstanceData::load() const { // in the other case load() will use a vector internally to grow to the size found in the file size_t n = file->load(id(), type_ ? type_->as_entity() : nullptr, type_ ? tmp_data : attributes_, getArgumentCount()); if (n != getArgumentCount()) { - Logger::Error("Wrong number of attributes on instance with id #" + boost::lexical_cast(id_)); + Logger::Error("Wrong number of attributes on instance with id #" + std::to_string(id_) + + " at offset " + std::to_string(this->offset_in_file()) + + " expected " + std::to_string(getArgumentCount()) + + " got " + std::to_string(n)); } + file->try_read_semicolon(); + // @todo does this need to be atomic somehow? if (tmp_data) { attributes_ = tmp_data;