From a724b5cb2407f118dd7ec70f234932765775ebe3 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 3 Oct 2022 14:02:04 +0200 Subject: [PATCH] Clarify character offset in exception --- src/ifcparse/IfcException.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcparse/IfcException.h b/src/ifcparse/IfcException.h index 0d004f0690..72b9348d70 100644 --- a/src/ifcparse/IfcException.h +++ b/src/ifcparse/IfcException.h @@ -62,7 +62,7 @@ namespace IfcParse { const std::string& expected_type ) : IfcException( - std::string("Token ") + token_string + " at " + + std::string("Token ") + token_string + " at offset " + boost::lexical_cast(token_start) + " invalid " + expected_type ) @@ -72,7 +72,7 @@ namespace IfcParse { char c ) : IfcException( - std::string("Unexpected '") + std::string(1, c) + "' at " + + std::string("Unexpected '") + std::string(1, c) + "' at offset " + boost::lexical_cast(token_start) ) {}