Skip to content

Commit c748c8d

Browse files
committed
Better instance not found error messages
1 parent 1f68d9d commit c748c8d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ifcparse/IfcParse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,15 +1806,15 @@ IfcEntityList::ptr IfcFile::entitiesByReference(int t) {
18061806
IfcUtil::IfcBaseClass* IfcFile::entityById(int id) {
18071807
entity_by_id_t::const_iterator it = byid.find(id);
18081808
if (it == byid.end()) {
1809-
throw IfcException("Entity not found");
1809+
throw IfcException("Instance #" + boost::lexical_cast<std::string>(id) + " not found");
18101810
}
18111811
return it->second;
18121812
}
18131813

18141814
IfcSchema::IfcRoot* IfcFile::entityByGuid(const std::string& guid) {
18151815
entity_by_guid_t::const_iterator it = byguid.find(guid);
18161816
if ( it == byguid.end() ) {
1817-
throw IfcException("Entity not found");
1817+
throw IfcException("Instance with GlobalId '" + guid + "' not found");
18181818
} else {
18191819
return it->second;
18201820
}

0 commit comments

Comments
 (0)