From 1c647c5365c3d656365845b8d4b2a66bfef0b54e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 1 Sep 2019 10:32:22 +1000 Subject: [PATCH] Print errors in case the name cannot be detected --- export.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/export.py b/export.py index fb9ed437e8..916986859f 100644 --- a/export.py +++ b/export.py @@ -79,7 +79,10 @@ class IfcParser(): return name.split('/')[0] def get_ifc_name(self, name): - return name.split('/')[1] + try: + return name.split('/')[1] + except IndexError: + print('ERROR: Name "{}" does not follow the format of "IfcClass/Name"'.format(name)) def is_a_spatial_structure_element(self, class_name): return class_name in ['IfcBuilding', 'IfcBuildingStorey', 'IfcSite'] # TODO: unhardcode