fix(dsh): slim packaged runtime and surface startup errors
This commit is contained in:
1 parent
df250e04ba
commit
caa79e7fcf
7 files changed
+159
-5
No files matched your search
@@ -1028,10 +1028,21 @@ class TrialTaskCenterWindow(MaterialMainWindow):
|
||||
self.run_panel.operator_band.style().polish(self.run_panel.operator_band)
|
||||
|
||||
def _open_dsh(self):
|
||||
self._ensure_dsh_view()
|
||||
self.content_stack.setCurrentWidget(self._dsh_view)
|
||||
if self._dsh_automation is not None and self._dsh_automation.latest:
|
||||
self._dsh_automation._publish_context()
|
||||
try:
|
||||
self._ensure_dsh_view()
|
||||
self.content_stack.setCurrentWidget(self._dsh_view)
|
||||
if self._dsh_automation is not None and self._dsh_automation.latest:
|
||||
self._dsh_automation._publish_context()
|
||||
except Exception as error:
|
||||
# QAction slots do not surface exceptions visibly in a frozen Qt
|
||||
# app. Route lazy import/WebEngine failures through the operator
|
||||
# error path instead of making the click appear to do nothing.
|
||||
try:
|
||||
self.service.report_ui_error(error)
|
||||
except Exception:
|
||||
pass
|
||||
self._show_error(TaskCenterError(
|
||||
'dsh_startup', 'DSH助手启动失败,请检查发布包中的运行时和 Node.js。'))
|
||||
|
||||
def _ensure_dsh_view(self):
|
||||
if self._dsh_view is None:
|
||||
|
||||
@@ -4,6 +4,7 @@ import json
|
||||
import re
|
||||
|
||||
ERROR_TEXT = {
|
||||
"dsh_startup": "DSH助手启动失败,请检查发布包中的运行时和 Node.js。",
|
||||
'user_forced_stop': '操作已强制中断,结果待核验。',
|
||||
'application_shutdown_failed': '业务结果已保留,但应用收尾异常。',
|
||||
"batch_resources_pending": "后台资源尚未确认释放,请使用“重新清理资源”后再开始下一批。",
|
||||
|
||||
Reference in new issue
Block a user