重构添加统一异常处理
This commit is contained in:
@@ -55,13 +55,13 @@ def run_test(self, test_type, test_items):
|
||||
|
||||
# 测试完成后更新UI状态
|
||||
if self.testing: # 如果没有被中途停止
|
||||
self.root.after(0, self.on_test_completed)
|
||||
self._dispatch_ui(self.on_test_completed)
|
||||
except Exception as e:
|
||||
self.log_gui.log(f"测试过程中发生错误: {str(e)}")
|
||||
import traceback
|
||||
|
||||
self.log_gui.log(traceback.format_exc())
|
||||
self.root.after(0, self.on_test_error)
|
||||
self._dispatch_ui(self.on_test_error)
|
||||
|
||||
|
||||
def run_screen_module_test(self, test_items):
|
||||
@@ -154,7 +154,7 @@ def run_custom_sdr_test(self, test_items):
|
||||
self.test_custom_sdr()
|
||||
|
||||
if self.testing:
|
||||
self.root.after(0, self.on_custom_template_test_completed)
|
||||
self._dispatch_ui(self.on_custom_template_test_completed)
|
||||
|
||||
|
||||
def run_sdr_movie_test(self, test_items):
|
||||
|
||||
Reference in New Issue
Block a user