Skip to content

Commit

Permalink
Set all exceptions&warnings as detailed messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Spr-Aachen committed Nov 13, 2024
1 parent 50bd225 commit 7f1f795
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion EVT_GUI/src/Functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def Function_SetMethodExecutor(
ClassInstance.errChk.connect(
lambda Err: (
QFunc.runEvents(successEvents) if Err == str(None) else None,
MessageBoxBase.pop(parentWindow, QMessageBox.Warning, 'Failure', f'发生异常\n{Err}') if Err != str(None) else None,
MessageBoxBase.pop(parentWindow, QMessageBox.Warning, "Failure", "发生异常", Err) if Err != str(None) else None,
FunctionSignals.Signal_TaskStatus.emit(QualName, 'Failed') if Err != str(None) else None
)
) if hasattr(ClassInstance, 'errChk') else None
Expand Down
15 changes: 10 additions & 5 deletions EVT_GUI/src/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,8 @@ def main(self):
EnvConfiguratorSignals.Signal_Aria2InstallFailed.connect(
lambda Exception: MessageBoxBase.pop(self,
QMessageBox.Warning, "Warning",
text = f"安装Aria2出错:\n{Exception}",
text = f"安装Aria2出错",
detailedText = Exception
)
)
EnvConfiguratorSignals.Signal_Aria2Detected.connect(
Expand Down Expand Up @@ -1607,7 +1608,8 @@ def main(self):
EnvConfiguratorSignals.Signal_FFmpegInstallFailed.connect(
lambda Exception: MessageBoxBase.pop(self,
QMessageBox.Warning, "Warning",
text = f"安装FFmpeg出错:\n{Exception}",
text = f"安装FFmpeg出错",
detailedText = Exception
)
)
EnvConfiguratorSignals.Signal_FFmpegDetected.connect(
Expand Down Expand Up @@ -1642,7 +1644,8 @@ def main(self):
EnvConfiguratorSignals.Signal_PythonInstallFailed.connect(
lambda Exception: MessageBoxBase.pop(self,
QMessageBox.Warning, "Warning",
text = f"安装Python出错:\n{Exception}",
text = f"安装Python出错",
detailedText = Exception
)
)
EnvConfiguratorSignals.Signal_PythonDetected.connect(
Expand Down Expand Up @@ -1677,7 +1680,8 @@ def main(self):
EnvConfiguratorSignals.Signal_PyReqsInstallFailed.connect(
lambda Exception: MessageBoxBase.pop(self,
QMessageBox.Warning, "Warning",
text = f"安装Python依赖库出错:\n{Exception}"
text = f"安装Python依赖库出错",
detailedText = Exception
)
)
EnvConfiguratorSignals.Signal_PyReqsDetected.connect(
Expand Down Expand Up @@ -1712,7 +1716,8 @@ def main(self):
EnvConfiguratorSignals.Signal_PytorchInstallFailed.connect(
lambda Exception: MessageBoxBase.pop(self,
QMessageBox.Warning, "Warning",
text = f"安装Pytorch出错:\n{Exception}",
text = f"安装Pytorch出错",
detailedText = Exception
)
)
EnvConfiguratorSignals.Signal_PytorchDetected.connect(
Expand Down

0 comments on commit 7f1f795

Please sign in to comment.