Skip to content

Conversation

CiiLu
Copy link
Contributor

@CiiLu CiiLu commented Aug 7, 2025

a39ffa626ce685c4c542cf56a632a82c

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issue #4207 by adding error dialogs for modpack download failures. The changes ensure that when network-based modpack downloads fail, users receive proper visual feedback through error dialog windows instead of silent failures.

  • Added error logging and user-facing error dialogs for modpack download failures
  • Enhanced error handling in both server manifest and direct modpack download scenarios
  • Imported necessary dependencies for error dialog display and logging

@HMCL-dev HMCL-dev deleted a comment from Copilot AI Aug 11, 2025
controller.onNext();
} else {
reject.accept(e.getMessage());
Logger.LOG.error("Failed to download modpack server manifest: ", e);
Copy link
Member

@Glavo Glavo Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不是致命错误,请使用 warning 而不是 error

而且请遵循代码中的惯例,静态导入 Logger.LOG

@HMCL-dev HMCL-dev deleted a comment from Copilot AI Aug 20, 2025
@HMCL-dev HMCL-dev deleted a comment from Copilot AI Aug 20, 2025
@HMCL-dev HMCL-dev deleted a comment from Copilot AI Aug 20, 2025
}
} catch (IOException e) {
reject.accept(e.getMessage());
LOG.warning("Failed to download modpack: ", e);
Copy link
Member

@Glavo Glavo Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

句子尾部不要加多余的冒号。

@Glavo
Copy link
Member

Glavo commented Aug 21, 2025

这个 PR 的处理方式看起来是错误的。原先就存在的 reject.accept(e.getMessage()) 本来就是处理错误的方式,不应该在这些地方添加弹窗,应该调查的是为什么 InputDialogPane 会被直接关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants