From 2015b7491d3be2244e8e1d38764cf5b8f4f1de39 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Mon, 26 Aug 2024 13:28:04 -0400 Subject: [PATCH] Revert "Annotate re-raised exception instead of logging it." This reverts commit 7b1fce0ea629063a1b1e42c6a7e74d70102bca47. This logging was duplicative when seen from STDERR, which also gets exception tracebacks that propagate up, but we need error messages and tracebacks to appear in the saved logs, too, and this is the only place we can do that. --- python/lsst/ctrl/mpexec/singleQuantumExecutor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/lsst/ctrl/mpexec/singleQuantumExecutor.py b/python/lsst/ctrl/mpexec/singleQuantumExecutor.py index 0b44437e..7262bf07 100644 --- a/python/lsst/ctrl/mpexec/singleQuantumExecutor.py +++ b/python/lsst/ctrl/mpexec/singleQuantumExecutor.py @@ -268,7 +268,13 @@ def _execute(self, task_node: TaskNode, /, quantum: Quantum) -> Quantum: try: self.runQuantum(task, quantum, task_node, limited_butler) except Exception as e: - e.add_note(f"Execution of task {task_node.label!r} on quantum {quantum.dataId} failed.") + _LOG.error( + "Execution of task '%s' on quantum %s failed. Exception %s: %s", + task_node.label, + quantum.dataId, + e.__class__.__name__, + str(e), + ) raise logInfo(None, "end", metadata=quantumMetadata) # type: ignore[arg-type] fullMetadata = task.getFullMetadata()