Opened 8 years ago
Closed 7 years ago
#1069 closed defect (fixed)
Trigger error messages difficult to debug
Reported by: | Tristan Croll | Owned by: | Greg Couch |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
At present, if a callback raises an exception its _TriggerHandler catches it and prints to the log something along the lines of:
Error processing trigger "selection changed"
... which in a large and complex application is not all that helpful in tracking down the culprit. I understand the rationale for not wanting to fully raise the exception, but what about amending lines 127-128 of triggerset.py to the following?
except Exception as e: _report('%s "%s": %s' % (TRIGGER_ERROR, self._name, str(e)))
In my case, that now gives me:
Error processing trigger "selection changed": 'Isolde' object has no attribute '_total_mobile'
... which gives me a clear indication of where to look.
Excellent suggestion, finally implemented.