diff --git a/src/ifcopenshell-python/ifcopenshell/util/schema.py b/src/ifcopenshell-python/ifcopenshell/util/schema.py index 41c717ebe2..a5d545b513 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/schema.py +++ b/src/ifcopenshell-python/ifcopenshell/util/schema.py @@ -68,7 +68,7 @@ def reassign_class(ifc_file, element, new_class): try: declaration = schema.declaration_by_name(new_class) except: - print(f"Class of {element} could not be changed to {new_class} as the class does not exist") + raise Exception(f"Class of {element} could not be changed to {new_class} as the class does not exist") info = element.get_info()