From f75f8b03c839f79bc960bdc804ddbd122c82949c Mon Sep 17 00:00:00 2001 From: Zhenyu Yao <111329301+zhenyu-ms@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:36:10 +0800 Subject: [PATCH] Fix/exporter error handling (#1138) --- testplan/common/exporters/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testplan/common/exporters/__init__.py b/testplan/common/exporters/__init__.py index 5e72d79b7..11acc2e4d 100644 --- a/testplan/common/exporters/__init__.py +++ b/testplan/common/exporters/__init__.py @@ -146,7 +146,10 @@ def run_exporter( ), exporter, ) - result = exporter.export(source) + try: + result = exporter.export(source) + except Exception: + exp_result.traceback = traceback.format_exc() except Exception: exp_result.traceback = traceback.format_exc() finally: