From cdfd34b61476c8fa14448fb6cc0bcbab82b629d5 Mon Sep 17 00:00:00 2001 From: Merlin Fisher-Levine Date: Wed, 4 Dec 2024 14:48:27 -0800 Subject: [PATCH] Improve error message for command time collisions --- python/lsst/summit/utils/efdUtils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/lsst/summit/utils/efdUtils.py b/python/lsst/summit/utils/efdUtils.py index d6d3512c..0f46250a 100644 --- a/python/lsst/summit/utils/efdUtils.py +++ b/python/lsst/summit/utils/efdUtils.py @@ -832,6 +832,8 @@ def getCommands( timeKey = time.to_pydatetime() if timeKey in commandTimes: - raise ValueError(f"There is already a command at {timeKey=} - make a better data structure!") + msg = f"There is already a command at {timeKey=} - make a better data structure!" + msg += f"Colliding commands = {commandTimes[timeKey]} and {command}" + raise ValueError(msg) commandTimes[timeKey] = command return commandTimes