Track last actions and friendlier error reporting when something breaks

This commit is contained in:
Dion Moult
2024-05-09 13:37:57 +10:00
parent f075a6178b
commit a1e0b8858e
6 changed files with 71 additions and 36 deletions
@@ -295,10 +295,11 @@ def serialise_settings(settings):
vcs_settings[key] = {"cast_type": "ndarray", "value": value.tolist()}
elif isinstance(value, list) and value and isinstance(value[0], ifcopenshell.entity_instance):
vcs_settings[key] = [serialise_entity_instance(i) for i in value]
if "add_representation" in usecase_path:
return ""
elif "owner." in usecase_path:
return ""
else:
try:
vcs_settings[key] = str(value)
except:
vcs_settings[key] = "n/a"
try:
return json.dumps(vcs_settings)
except: