Skip to content

Add try-catch block to catch module loading errors.#134

Merged
marchermans merged 1 commit intoMcModLauncher:mainfrom
ChiefArug:try-catch_moduleerrors
May 30, 2025
Merged

Add try-catch block to catch module loading errors.#134
marchermans merged 1 commit intoMcModLauncher:mainfrom
ChiefArug:try-catch_moduleerrors

Conversation

@ChiefArug
Copy link
Contributor

This ensures we can log them so they make it to the log file rather than being lost to the void of stdout.
Band-aid fixes #133

Tested in production with CurseForge by sneakily replacing the jar after it passes the hash check. Normally it cuts off after the mod list (as CF reads the latest.log file rather than capturing the stdout/stderr).
image

It would be great if this can be [back]ported to as many MC versions as possible.

@marchermans marchermans enabled auto-merge (squash) May 30, 2025 09:19
Copy link
Contributor

@shartte shartte left a comment

Choose a reason for hiding this comment

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

Minor nitpick, then we can merge

This ensures we can log them so they make it to the log file rather than being lost to the void of stdout.
@shartte shartte force-pushed the try-catch_moduleerrors branch from e5e1e34 to f82613d Compare May 30, 2025 10:25
@marchermans marchermans merged commit 901c6ea into McModLauncher:main May 30, 2025
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.

Errors from creating modules do not make it to logging

3 participants