From 650e62a9de46e3da35aba22e52ba08552434d0f2 Mon Sep 17 00:00:00 2001 From: appel_c Date: Fri, 15 Aug 2025 09:28:28 +0200 Subject: [PATCH] w --- superxas_bec/devices/timepix/timepix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superxas_bec/devices/timepix/timepix.py b/superxas_bec/devices/timepix/timepix.py index be5d493..b07ab66 100644 --- a/superxas_bec/devices/timepix/timepix.py +++ b/superxas_bec/devices/timepix/timepix.py @@ -7,6 +7,7 @@ is implemented via EPICS IOC. import enum import threading import time +import traceback from typing import Any, Literal import numpy as np @@ -476,8 +477,8 @@ if __name__ == "__main__": # pragma: no cover timepix.unstage() print("Timepix unstaged.") except Exception as e: - print(f"An error occurred: {e}") - logger.error(f"An error occurred: {e}") + content = traceback.format_exc() + logger.error(f"An error occurred: {content}") finally: timepix.destroy() print("Timepix destroyed.")