From c748c8dcea03f6f5ff261b119e4d51dd53a65c75 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 23 Apr 2018 10:51:59 +0200 Subject: [PATCH] Better instance not found error messages --- src/ifcparse/IfcParse.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index e17635ae70..d5f50d90f9 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -1806,7 +1806,7 @@ IfcEntityList::ptr IfcFile::entitiesByReference(int t) { IfcUtil::IfcBaseClass* IfcFile::entityById(int id) { entity_by_id_t::const_iterator it = byid.find(id); if (it == byid.end()) { - throw IfcException("Entity not found"); + throw IfcException("Instance #" + boost::lexical_cast(id) + " not found"); } return it->second; } @@ -1814,7 +1814,7 @@ IfcUtil::IfcBaseClass* IfcFile::entityById(int id) { IfcSchema::IfcRoot* IfcFile::entityByGuid(const std::string& guid) { entity_by_guid_t::const_iterator it = byguid.find(guid); if ( it == byguid.end() ) { - throw IfcException("Entity not found"); + throw IfcException("Instance with GlobalId '" + guid + "' not found"); } else { return it->second; }