Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime errors #7155

Open
wants to merge 19 commits into
base: dev/feature
Choose a base branch
from

Conversation

sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Oct 18, 2024

Description

Creates a RuntimeErrorProvider interface that SyntaxElements can implement in order to throw runtime errors and warnings.

image

Out of scope, for future PRs:

  • a try-catch-esque method of suppressing and catching runtime issues
  • the ability to get the last runtime issue as a string.

Target Minecraft Versions: any
Requirements: none
Related Issues: none

@sovdeeth sovdeeth added the feature Pull request adding a new feature. label Oct 18, 2024
@sovdeeth sovdeeth marked this pull request as draft October 18, 2024 00:46
@erenkarakal erenkarakal mentioned this pull request Oct 18, 2024
1 task
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

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

General thoughts / formatting

Nice work

@sovdeeth sovdeeth added the 2.10 Targeting a 2.10.X version release label Dec 17, 2024
Switch to REConsumer, create RE and ErrorSource classes, use new config reload event.
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

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

Looking really good with these changes.

I think this is looking really good. My main concern is with how the strings are being passed/formatted around. Do you think we would be able to move some of this Bukkit-specific formatting stuff into the consumers? For example, when appending to timeoutTexts, don't call Utils#replaceEnglishChatStyles on the string there and instead call it within the consumer

@sovdeeth sovdeeth marked this pull request as ready for review December 18, 2024 03:51
@sovdeeth sovdeeth requested review from APickledWalrus and a team December 18, 2024 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.10 Targeting a 2.10.X version release feature Pull request adding a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants